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.
Variables and Custom Highlighter
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 23181
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Variables and Custom Highlighter
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.
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.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.