Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Problem with XML-like markup

Aaron,

Great to hear that you're using WikiText!

It looks to me as though you're trying to reuse some internal classes from the TracWiki project.  The '!' character is an escape character with Trac wiki markup.

I suggest that you stick with classes that are API.  In other words, avoid any classes with package names that contain the word 'internal'.  You'll find most of these in org.eclipse.mylyn.wikitext.core.

Regards,

David

On Tue, Feb 9, 2010 at 1:51 AM, Aaron Digulla <digulla@xxxxxxxx> wrote:
Hi,

I'm trying to support XML-like markup in my markup language using SimpleWrappedPhraseModifier.

This works:

   <em>hello</em>

while this doesn't:

   <em>hello!</em>

I think the problem is in this code:

       protected String getPattern(int groupOffset) {
               String pattern = Pattern.quote(startDelimiter)
               + "([^\\s-](?:.*?[^\\s-])?)(?:(?<=[^!])" //$NON-NLS-1$
               + Pattern.quote(endDelimiter)
               + ")"; //$NON-NLS-1$
               return pattern;
       }

specifically in "...(?<=[^!])"

Why do you exclude "!" here? I'd figure it's a pretty common thin at the end of a sentence...

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators


Back to the top