Simple mode and nested wiki markup

When using simple mode is there a way of persisting markup highlighting from the start token to the end token?
For example, with the (PmWiki) markup ‘^superscript markup^’ and ‘bold markup

With the nested markup
’* bold and some ‘^superscript^’ markup*'
then only the bold shown.

Using simple mode as follows
{regex: /’*.?*’/, token: “pm-bold”},
{regex: /’^.
?^’/, token: “pm-sup”},


This isn’t a use case that has come up yet for the simple mode system, and it indeed can’t handle it. Matching markup is generally a very different problem from matching programming languages, so I’m not sure if trying to extend the simple mode language to cover it is a good idea. I think the best way forward is to write a classical, programmatic mode for your markup language.

Hello @skiwi!

I’m having the same trouble. How did you solve it? :smiley:

I didn’t solve the problem,
I had hoped that it might be possible to enhance the simple markup for simple cases like this.
Marijn’s response is that this isn’t to be.
I don’t have the resources to develop a ‘classic programmatic mode for my markup language’,
so I’ve let it lapse.

1 Like

I see. Thanks anyway. I was also trying to create a mode with nested markup but I’m not seeing how to do it .