From: Jeff D. <da...@da...> - 2002-11-07 20:47:43
|
On Thu, 07 Nov 2002 21:30:45 +0100 Martin Geisler <gim...@gi...> wrote: > There's a problem with this markup: it only works when there's a space > after the closing *, _ or =. So your example doesn't work as you typed > it - you have to type it like this: > > *bold* , _italic_ , and =monospace= . Okay, that's a bug. I'll look at it. As you point out, the regexps are hairy. > Also, why is the underscore used for italic? I've always thought that > one used /slashes/ for italic and _underscore_ for underlining. At > least that's how Gnus pretty-prints my mails, and it also seams more > logical to me. This was discussed at length awhile ago. It seems everyone has their own ideas on the precise meaning of the the possible emphasis characters. A problem with slashes as delimeters is that slashes commonly occur as parts of filenames. (E.g. on unix systems, config files are kept in /etc/.) When used in ascii email, it's easy for all to agree that all these things are some form of emphasis --- exactly what sort of emphasis each corresponds to is subject to disagreement... I think it's fairly non-controversial to assert that *this* and _this_ are (by far) the most commonly used forms of emphasis in e-mail. Therefore, my feeling is that these should correspond to bold and italic emphasis, or vice versa... > The changed class is this: > > class Markup_nestled_emphasis extends BalancedMarkup > { > var $_start_regexp = '[*_=\/]'; > > function getEndRegexp ($match) { > return "\\" . $match; > } > } The "nestled" in nestled emphasis means that the delimiters have to be properly nestled at (some sort of) word boundaries. The opening delimiter must have no space between it and the beginning of the first delimited word, and correspondingly there must be no space between the last delimited word and the trailing delimiter. |