May 24
Question about Extending Markdown
I've been reading through the NotePlan article on extending Markdown. I'm particularly interested in highlighting and underlining. Following the guidelines in that article, I've modified an existing style and copy/pasted in the relevant JSON entries. However, I don't really understand what "matchposition" does nor do I understand the difference between, for example, "highlighted", "highlighted-left-colon", and "highlighted-right-colon". I believe those three bits of "code" implement different colours or intensities of highlighting, but all I know is to write something like "::Name::", expecting "Name" to be highlighted. What do the "right-colon" and "left-colon" designations mean and how do I invoke them?
Closed
Thanks for the question! I'll give you a couple of answers here, though the feedback board is not a good place for questions. Please follow up on Discord (mark me @EduardMe for example, so I see it) or email: [email protected]. **Here my replies:** The left and right colon entries in the theme files are to hide the "::" when you move the cursor out of the word and as you mentioned to change the color to something with low alpha so it looks better while editing. The match position defines which group in the regex string is used to locate the text. A regex match group is surrounded by "(" and ")". The left and right "::"s are in other match groups as the main content. This makes it possible that you can use the same regex and just change the match position to target the left and right colons in order to hide them. Hope this helps! Best, Eduard