asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
51 stars 16 forks source link

Title of link should be highlighted #28

Closed ggrossetie closed 8 years ago

ggrossetie commented 8 years ago

syntax-high-bold-italic

I think title of a link should be highlighted because in my opinion the title is as important as the URL. Also for consistency automatic link should also be highlighted.

nerk commented 8 years ago

This seems to be a problem with your current theme. 'Solarized' or 'Twilight', for example, are working for me. From the other themes I tried, some work, some don't. In general, the dark and more colorful themes seem to map more style variables than others.

'Brackets Light' and 'Brackets Dark' are not working, unfortunately. I might change the appropriate style variables to some variables which are mapped by the default styles. However, this might have unwanted effects with other styles.

I am pretty unsure about the best way to handle this.

ggrossetie commented 8 years ago

Good question... how can we know which token type are mapped for a theme ? Maybe we could use a more restrictive subset of token types when we don't know the theme and use a richer subset of token types when the theme is Solarized, Twilight... ?

But I think the highlight should work with the default theme (at least for very common markups like bold, italic or lists)

ggrossetie commented 8 years ago

... variables get the token type cm-variable-2 which is just the default text color. https://github.com/adobe/brackets/issues/2842#issue-10869951

I can see that we're using variable-2 for list, numbered, unnumbered, is there any other token available ?

nerk commented 8 years ago

variable-2 is also used for the link title. I think we should just change that so that it works well for the default themes. However, I do not see an easy way to display the square brackets in the same color as the link and only hightlight the title separately. I suggest to simply display the whole link including square brackets and title in the same color.

As for the lists, we can just choose a different mapping which looks nice with the default themes.

ggrossetie commented 8 years ago

Sounds good to me :+1: