TT, Agreed, I did try and hack the existing parser but failed. As Control Panel > Info > Advanced > parsing shows, there is a list of parse rules that can be toggled. I would like to see the ability to extend this and add out own, just as we can for example with the editor toolbar. In my case asking a leading period to wrap a paragraph in `<p></p>` or a version thereof would possibly be similar to other uses. In my case I dont need a generic solution but I would not be asking for this specific one if there was a general solution. I see three reasons to add minor additions to parsing;
- To add a feature as I wish to get a useful markup addition - To add extended forms of markup such for someone doing a lot of document composition such as markup that throws a chapter etc... - To better handle text data from other sources The fact is the above can be handled with html in many cases but its nice to keep it minimal readable text. I think the issue I face as a super user as opposed to a developer is how do I insert some custom parsing into the parsing process. I just want a little more hackability. Regards Tony On Tuesday, December 31, 2019 at 1:07:03 AM UTC+11, @TiddlyTweeter wrote: > > TonyM wrote: >> >> I am keen to see more hackability I would like to extend wiki text to >> prefix a paragraph with period to wrap it in html p tags however when it >> comes to tabs the codemirror plugin supports tabs well. >> > > Ciao Tony > > I'd say that the parser mechanism is very clean in TW. > > It is well designed. It is eminently hackable. > > *I think the issue is largely about having some examples of how to create > a new parser.* > > The parsers are in JS. Even though I don't understand JS I can see that it > is the way to do it. > Parsing in TW uses regular expressions plus AST components to guard > against conflicts between them, as well as cope with nesting situations. > > In my last post to Mat I suggested that a "Custom Parser" might be one > thing to ask for. > That would be something like a JS parser that will take simple regex and > apply it to "User Custom WikiText". > > My two cents > TT > > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/c7623faf-5289-46d8-bbcd-42c661626b81%40googlegroups.com.
