On Friday, September 1, 2017 at 2:12:55 PM UTC+2, Jeremy Ruston wrote:
>
> Instead, I’ve wondered whether we might be able to make (some of) the 
> existing parser rules much more configurable. For example, right now there 
> are 6 separate parser modules for each of bold, italic, strikethrough, 
> subscript, superscript and underscore:
>
>
> https://github.com/Jermolene/TiddlyWiki5/tree/master/core/modules/parsers/wikiparser/rules/emphasis
>
> But, if you look at the individual JavaScript files, you’ll see that they 
> only vary through a few parameters: the name of the rule, the regular 
> expression to match at the start, and the regular expression to match at 
> the end, and the tag of the HTML element to create.
>

There was a reason, why we splitted the emphasis rule: 
https://github.com/Jermolene/TiddlyWiki5/issues/701 

So, one could imagine refactoring things so that there was a single JS 
> parse rule, and that it was instantiated multiple times with different 
> parameters.
>

That's right, but we can't sacrifice the existing flexibility. .... 

-m

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/199e0e52-a4ad-487c-b081-f74a93fca413%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to