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

Broken java highlighting #831

Closed
nerro opened this issue Dec 4, 2017 · 8 comments · Fixed by #1414
Closed

Broken java highlighting #831

nerro opened this issue Dec 4, 2017 · 8 comments · Fixed by #1414
Assignees
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@nerro
Copy link
Contributor

nerro commented Dec 4, 2017

Hello,

I found that in java code some utf-8 symbols (like german umlauts) will be rendered as error (with red background text).
Example: http://rouge.jneen.net/pastes/eePb

I'll try to figure it out myself how to fix it.

@aalvrz
Copy link
Contributor

aalvrz commented Dec 5, 2017

Good catch.

However (and correct me if I am wrong), but you shouldn't really write code that contains special characters...

@dblessing
Copy link
Collaborator

dblessing commented Dec 6, 2017 via email

@nerro
Copy link
Contributor Author

nerro commented Dec 6, 2017

@BigChief45 , @dblessing, you both are right. Actually it's not good practice to write code like this, but sometimes you have to generate code for WSDL (https://en.wikipedia.org/wiki/Web_Services_Description_Language).

P.S. It maybe even worse 😄 instead of ß you can write \u00df.

@ew-git
Copy link

ew-git commented Jan 26, 2019

Just want to add that the Julia community uses a wide array of Unicode characters more frequently (certainly not bad practice!), so more robust support would be great.
https://docs.julialang.org/en/v1/manual/unicode-input/index.html
http://rouge.jneen.net/pastes/1NDV

Somewhat related issue: #934

Thank you all for your work on this project.

@stale
Copy link

stale bot commented Jan 26, 2020

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.

If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

@stale stale bot added the stale-issue There has been no activity for a year. label Jan 26, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Jan 26, 2020

Confirmed this is still occurring in v3.15.0. This should be something relatively easy to fix. I'll take a look.

@stale stale bot removed the stale-issue There has been no activity for a year. label Jan 26, 2020
@pyrmont pyrmont self-assigned this Jan 26, 2020
@pyrmont pyrmont added the bugfix-request A request for a bugfix to be developed. label Jan 26, 2020
@jneen
Copy link
Member

jneen commented Jan 27, 2020

Comes down to these:

      id = /[a-zA-Z_][a-zA-Z0-9_]*/
      const_name = /[A-Z][A-Z0-9_]*\b/
      class_name = /[A-Z][a-zA-Z0-9]*\b/

Replace them with [:upper:] and [:lower:] and it should work out

@pyrmont
Copy link
Contributor

pyrmont commented Jan 27, 2020

Thanks @jneen! Will submit a bug fix soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants