Variables and Custom Highlighter

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
DeWayne Rosene
Posts: 33
Joined: Wed Feb 08, 2012 6:34 pm

Variables and Custom Highlighter

Unread post by DeWayne Rosene » Fri Nov 20, 2020 6:22 pm

I have had to make major changes to my documentation to support product branding. That included the use of several <%variables%> in text that is part of our product syntax. I had been using a Custom Highlighter to quickly format syntax in instructions and examples. Now I find that the document is broken everywhere a variable was inserted because the custom highlighter modifies the xml to highlight the <%> symbols and in the process breaks variable substitution.

<%PREFIX_LC%>cmd display <pgm_name> --format=<<%PREFIX%>>MON

Note that <> symbols are used to enclose actual "variables" and in that case must remain red.

So far the only thing I can do is manually apply a single color to the <%variable%> strings after applying the highlighter to change the <%> symbols back to black. I will say doing that is less painful then typing the example above in this post. Thank you H&M for automating such markdown!

No I cannot add the "variable" name to the list of custom words because I don't want it to use the same color as the rest of the symbols in the syntax! You can also see that I created "variable_LC" variants to handle case. As someone else requested, it would be nice if variables could take on the attributes of other adjoining text, when there is no space between the variable and the text, eg: <%VARIABLE%> abc and <%variable%>abc

If there is no solution in HM7 what about HM8. Could be enough to justify an upgrade.

User avatar
Tim Green
Site Admin
Posts: 21973
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Variables and Custom Highlighter

Unread post by Tim Green » Sat Nov 21, 2020 12:06 pm

Hi DeWayne,

I'm afraid this is the same problem as using Help+Manual variables in JavaScript and HTML source. No syntax highlighter on earth is going to be able to format that correctly. It drives me crazy all the time in skin development but there is really nothing you can do about it except just grin and bear it. The highlighter isn't an EC development, and even if it was HM variables can literally contain anything so there's no practical way to ensure that the content they contain will be formatted correctly, since the formatting is applied during editing and the variables are not resolved until you publish. :?
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

Post Reply