Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Wildcards in UDL

    Help wanted · · · – – – · · ·
    udl
    2
    4
    402
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F2 Andy
      F2 Andy last edited by

      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).

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @F2 Andy last edited by

        @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.

        1 Reply Last reply Reply Quote 1
        • F2 Andy
          F2 Andy last edited by

          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?

          Ekopalypse 1 Reply Last reply Reply Quote 0
          • Ekopalypse
            Ekopalypse @F2 Andy last edited by

            @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.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors