Re: [Zope-dev] STX and underline symbology

2001-10-23 Thread R. David Murray

On 19 Oct 2001, Alastair Burt wrote:
   1) there are no spaces in strings to underline, only more '_'
  (_this_is_an_example_), or

I'd vote for this.  I think it makes underlining more visual when reading
the stx in text mode.

--RDM


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] STX and underline symbology

2001-10-23 Thread Andreas Jung

Feel free to provide a patch and unittests *wink*

Andreas

- Original Message - 
From: R. David Murray [EMAIL PROTECTED]
To: Alastair Burt [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 15:47
Subject: Re: [Zope-dev] STX and underline symbology


 On 19 Oct 2001, Alastair Burt wrote:
1) there are no spaces in strings to underline, only more '_'
   (_this_is_an_example_), or
 
 I'd vote for this.  I think it makes underlining more visual when reading
 the stx in text mode.
 
 --RDM
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] STX and underline symbology

2001-10-19 Thread Alastair Burt

In the current version of STX, the underline symbology is not very good for
documenting Python. In the string python_function1 does this, and
python_function2 does that, function1 does this, and python gets
underlined. I think it would be better if either:

  1) there are no spaces in strings to underline, only more '_'
 (_this_is_an_example_), or

  2) the final _ should be followed by whitespace or punctuation.

--- Alastair


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] STX and underline symbology

2001-10-19 Thread Andreas Jung

I checked in some fixes to underline handling into the trunk
and the 2.4 branch. Please check this out. If the problems
persist, please send me a small testcase.

Andreas
- Original Message -
From: Alastair Burt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 19, 2001 06:25
Subject: [Zope-dev] STX and underline symbology


 In the current version of STX, the underline symbology is not very good
for
 documenting Python. In the string python_function1 does this, and
 python_function2 does that, function1 does this, and python gets
 underlined. I think it would be better if either:

   1) there are no spaces in strings to underline, only more '_'
  (_this_is_an_example_), or

   2) the final _ should be followed by whitespace or punctuation.

 --- Alastair


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] STX and underline symbology

2001-10-19 Thread Alastair Burt

Andreas Jung [EMAIL PROTECTED] writes:

 I checked in some fixes to underline handling into the trunk
 and the 2.4 branch. Please check this out. If the problems
 persist, please send me a small testcase.

I don't really know my way around CVS. The version I checked out has the
following in DocumentClass.py: 

def doc_underline(self,
  s,
  #expr=re.compile(r\_([a-zA-Z0-9\s\.,\?]+)\_).search, # old 
expr, inconsistent punc, failed to cross newlines
  expr=re.compile(r'_([%s%s%s\s]+)_' % (letters, digits, 
under_punc)).search):

result = expr(s)
if result:
if result.group(1)[:1] == '_':
   return None # no double unders
start,end = result.span(1)
st,e = result.span()
return (StructuredTextUnderline(s[start:end]),st,e)
else:
return None

And this does what I said in my message:

  python_function1 does this, and python_function2 does that

becomes:

 ppythonufunction1 does this, and python/ufunction2 does that/p

--- Alastair

P.S. The following would support alternative 2 in my original message:


def doc_underline(self,
  s,
  #expr=re.compile(r\_([a-zA-Z0-9\s\.,\?]+)\_).search, # old 
expr, inconsistent punc, failed to cross newlines
  expr=re.compile(r'_([%s%s%s\s]+)_[\s%s]' % (letters, digits, 
under_punc, phrase_delimiters)).search):
result = expr(s)
if result:
if result.group(1)[:1] == '_':
   return None # no double unders
start,end = result.span(1)
return (StructuredTextUnderline(s[start:end]), start-1, end+1)
else:
return None



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )