Wildcards in UDL



  • Is there a wildcard in UDL? I have found posts from about four years ago saying there is not, but I am hoping the situation may have changed. I read the documentation, and there looks to be a special code in double brackets. The two example I have seen of it in use are ((EOL)) and (( \ ??/)). However, I could not find any more than that. I had a quick play around, and failed to get anything to work.

    More specifically, I want to have keywords identified only if they are at the start of a line, allowing for indenting (for Pug templates).



  • @F2-Andy said in Wildcards in UDL:

    Is there a wildcard in UDL?

    No, there is a prefix mode, like a word starting with … gets colored, but that is it.

    More specifically, I want to have keywords identified only if they are at the start of a line, allowing for indenting

    So you just want to color those words to get yourself triggered to indent these lines? If you can/want to install python script we can create a script doing this more automatically. If you are interested, of course.



  • To add a bit more background, Pug is a template for HTML pages, so most of the text is prose. Keywords are characterised by being at the start of a line. So “if” at the start of the line is a Pug command, and in the middle of the line it is just plain text. I guess that is quite different to a programming language, where “if” always means the same thing.

    I would be interested in looking at a Python script. Is there some documentation somewhere, so I could at least get some idea of what is involved?



  • @F2-Andy

    The actual documentation is on github a source.
    The documentation found on sourceforge is, afaik, outdated.

    For coloring, I posted a possible solution here.

    If there is anything I can do, let me know.


Log in to reply