The UDL can handle doing different colors for `single backticks` vs triple
``` long code ```For example, here is a screenshot using the “markdown (preinstalled)” UDL that comes with Notepad++:
5bee2f23-5331-485e-a948-783587fdf052-image.png
Then, if I remove the single ticks from Delimiter 2 and move it to Delimiter 8 (which was empty before) and give 8 a different color, it works just fine:
8df18d51-af9a-4f45-986a-aca6e6284a4d-image.png
The one thing to keep in mind with making Delimiters for “triple” vs “single”: you have to put the triple before the single, otherwise when it’s doing it’s parsing, it will match on the single rule first. (It searches through the delimiters in the 1-8 order)
And if you wanted to allow specific keywords (say keyword8) inside the triple quotes (delimiter 2), then you can go into the styler for delimiter2 and allow keyword8 inside:
49f17867-6e52-4cdd-8d39-75f0f46c731b-image.png
fc5ebe90-be88-4a3b-a81b-53b5a5ee8432-image.png
I am not sure what you were trying to indicate with the “BNF” in your question: if you just meant keywords, then I’ve shown it works. But something like the @udtf(...) would be more difficult – at least with the way “markdown (preinstalled)” is defined. And getting full python highlighting inside of the code-block markdown is not possible, the way that UDL and N++ is implemented.
But, at some point, based on the complexity you are describing, it might go beyond what UDL is capable of: UDL was meant for “simple” syntaxes, and if you wanted something more complicated, then the idea was that a lexer plugin could be the next step to bridge the gap between UDL and what N++ provides natively.