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

Syntax Highlighter breaks if multiple blocks have the same color #2

Closed
shysaur opened this issue Feb 8, 2015 · 5 comments
Closed
Assignees

Comments

@shysaur
Copy link
Owner

shysaur commented Feb 8, 2015

The syntax highlighter reads in various places on the existing coloring to:

  • check if a string parsing operation was suspended (range too short)
  • check if a string is inside a comment
  • possibly other places?
@balthisar
Copy link

A hacky way to do it while observing the user defaults would be to ensure that all colors are unique, even if the defaults specify the same color for multiple text types. For example, change the R value by one bit, or brightness, or something not really noticeable.

@shysaur
Copy link
Owner Author

shysaur commented Feb 10, 2015

Now you have the issue of tracking which bits you add, otherwise we'll end up creating duplicates of the manipulated color.

@shysaur shysaur self-assigned this Mar 1, 2015
@balthisar
Copy link

Do you have sample text that causes this failure?

@shysaur
Copy link
Owner Author

shysaur commented Mar 2, 2015

I'm already looking into it and added some infrastructure for fixing this in defe94c.

Any text will do, the problem is that some syntax coloring passes look at the color added in previous passes. The issue is that if some passes assign the same color, this code will get confused and will probably produce incorrect results. The passes which do this are mainly the ones that can do multiline coloring.

@shysaur
Copy link
Owner Author

shysaur commented Mar 2, 2015

Also, I assigned myself to this... :-)

@shysaur shysaur closed this as completed in b2669fb Mar 2, 2015
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

No branches or pull requests

2 participants