Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change image link highlighting for mode-markdown #3667

Closed
wants to merge 1 commit into from
Closed

Change image link highlighting for mode-markdown #3667

wants to merge 1 commit into from

Conversation

RickStrahl
Copy link
Contributor

Image link highlighting in mode-markdown seems to not highlight the leading ! character. In some cases this looks OK in others maybe not so much. I think it's probably better to have the entire image formatting use the same colors.

Added in explicit image link handling.

This is what it looks like before:

image

and here it is after the change:

image

The latter seems more consistent.

To be honest this is minor but several of my users have mentioned this (here's one) and looking at the two renderings side by side I do think that the latter looks more consistent.

Copy link
Member

@nightwing nightwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree that using same token looks better, could you please rebase your changes onto master, the version you have used is too old, and can't be merged.

@@ -110,6 +110,14 @@ var MarkdownHighlightRules = function() {
}, { // link by reference
token : ["text", "string", "text", "constant", "text"],
regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
}, { // link image
token : ["text", "string", "text", "markup.underline", "string", "text"],
regex : "(\\!\\[)(" + // ![
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to add !? to the link url, to not repeat the same regexp twice.

@RickStrahl
Copy link
Contributor Author

I'm not sure what happened here - looks like I accidentally linked upstream to an old build rather than the forked copy I'd pulled yesterday. Anyway it'll be easier to just resubmit a clean version. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants