[SVN] Revision 1259 (markdown)
Charilaos Skiadas
cskiadas at uchicago.edu
Mon Jun 27 00:37:25 UTC 2005
I think we should add:
*ital *ic*
as a case. The whole thing should be italisized, not just the second
part. We probably don't want to allow stars "space escaped from the
left". I.e. this might be better:
*]([^\\\\* ]|\\\\.| [*]| )*(?<! )[*]
Also we need to add this case:
* not *italic*
The first star should not be allowed to be followed by a space in the
pattern. Not sure how to fix that.
On Jun 26, 2005, at 6:10 PM, Hadley Wickham wrote:
> Italic regexp that work for all test-cases.
>
> Regexp (for * case) is [*]([^\\\\* ]|\\\\.| [*] | )*(?<! )[*]:
>
> 1. match *
> 2. match:
> anything that isn't a space, \ or *, OR
> anything backslash escaped, OR
> a "space escaped" * OR
> a single space
> 3. something other than a space
> 4. and the final *
>
> Along with constant.character.escape.markdown which stops anything
> backslashed matching the first occurence, this all seems to work.
> Although I'm not entirely my regexp logic is totally correct, it
> doesn't fail for any of the (considerably expanded) test cases.
Haris
More information about the textmate-dev
mailing list