ali-rantakari / peg-markdown-highlight

C library for Markdown syntax highlighting, using a recursive-descent parser.
Other
181 stars 36 forks source link

Separate theme coloring for link text and url #23

Open efc opened 5 years ago

efc commented 5 years ago

It seems that there is no way to separately style the text and url of markdown links with PEG Markdown Highlight. I'd love to give the link itself a separate color from the text, in other words have [blue](light-blue) kind of styling. But it seems we only have LINK available in the theme.

Could a LINK_URL element type be added to color the url separately? If the LINK_URL color is missing, just use the LINK color, but if it is present in the theme, then use it for the url portion of the link.

This would make it much easier to read documents with lots of links. What most people really need to do is read either the primary text (proofreading for meaning) or the urls (proofreading for function), but those are two very different tasks. It would be very helpful to use color to distinguish those portions of the document.