Notes-up icon indicating copy to clipboard operation
Notes-up copied to clipboard

Syntax Highlighting doesn't work with special characters

Open yerbestpal opened this issue 7 years ago • 7 comments

The highlighting seems to work fine for one of my notes, but not for the rest. I can't see any errors on my own part, but I wouldn't rule it out. I'm never actually worked with markdown in the past.

Working: working working1

Not working: not_working1 not_working

yerbestpal avatar May 01 '17 00:05 yerbestpal

@yerbestpal Mind posting the raw markdown text? :) or if you don't want to post them could you email them to me? Thanks!

Philip-Scott avatar May 01 '17 00:05 Philip-Scott

I'll email you it. I don't know how to post raw on Github because it recognises markdown.

yerbestpal avatar May 01 '17 00:05 yerbestpal

If you make a new page with only the block of code you sent me, does it not work for you? Because it is working on my end :thinking:

screenshot from 2017-04-30 21 12 40

I'm guessing the plugin is/could be crashing from something else in your page, mind sending the whole thing? :)

Philip-Scott avatar May 01 '17 02:05 Philip-Scott

Ahh! I found the problem!

You have this block of text:

For loop in Python:
The for loop processes each item in a sequence, so it is used with Python’s sequence
data types - strings, lists, and tuples.Each item in turn is (re-)assigned to the loop variable

If you remove the apostrophe on Phython's it's working again :) The plugin might be crashing or something on weird characters. It's actually not a bug with my code but with https://highlightjs.org. I'll see if i can fix it, or if i can poke who knows more about it

Philip-Scott avatar May 01 '17 02:05 Philip-Scott

Sorry I had to go to bed last night. The block of code does work if I make a new note but removing the apostrophe doesn't solve any problems for me.

yerbestpal avatar May 01 '17 10:05 yerbestpal

It looks like apostrophes are the problem for everything. I'm rewriting this guys notes from scratch and I'm having no errors. Thanks for all your help. One last question; can I apply code formatting to snippets of code, or does it have to be code blocks?

yerbestpal avatar May 01 '17 11:05 yerbestpal

Oh, are you planning on addressing this? I actually thought this was an issue with Markup its self, and not something you could fix.

yerbestpal avatar Jun 04 '17 22:06 yerbestpal