scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3k stars 549 forks source link

html.nanorc corrupts lines containing emoji #388

Open ghost opened 2 years ago

ghost commented 2 years ago

In this example, you can see that: 2020 becomes >202 </tr> becomes </tr>>

nano without html.nanorc:

Screenshot 2022-02-08 at 2 38 02 p m

with html.nanorc

Screenshot 2022-02-08 at 2 38 21 p m

Root cause seems to be the handling of emoji. I created a tr without one and it displays fine:

Screenshot 2022-02-08 at 2 42 12 p m

You can see in the image that the date isn't corrupted and no trailing ">" inserted.

Now that I've tasted syntax highlighting I can't go back. I hope this is fixable :) Thanks for the effort! Source code attached. index.html.txt

davidhcefx commented 2 years ago

That looks like a GNU Nano problem instead of a highlighting problem. Anyway, what's your platform? I can't replicate on Ubuntu 18.04 with nano 6.2.

ghost commented 2 years ago

Apologies for the delay. I believe it was macOS I was on at the time.