question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unmatched < meant as Literal < Breaks Highlighting When inline HTML is Present

See original GitHub issue

For example:

|        Thing 1       |      Description      |
|----------------------|-----------------------|
| HTML | First some html.<ul><li>One</li><li>Twp</li></ul> |
| `<` | Don't do this, everything goes to hell |
| Other line | RED MODE ACTIVATED |
| `'` | No more red |

As it appears in the editor: image

Editable version

Note that the < cannot be replaced with &lt; as that displays as a literal &lt; and it’s the single quotes in the text description that gets the red treatment, which will continue until either another ' is found (anywhere) or the end of the file is reached. Nor can the ' or '< be escaped (e.g. \' or \<).

This makes it particularly frustrating to edit the markdown page for a custom esolang where < one command and I require a bulleted list in the description for another command (as it does multiple things, based on its inputs) and the syntax highlighting in this case makes the text under it nearly impossible to read.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
aero31aerocommented, Oct 26, 2019

Yeah, I haven’t deployed the changes yet. It should be live soon.

On Sat, Oct 26, 2019, 7:57 PM Draco18s notifications@github.com wrote:

The live version hasn’t updated yet (probably github’s caching) but injecting the change at least lets me read the text in those regions. [image: image] https://user-images.githubusercontent.com/1750680/67621086-cdd51f00-f7d2-11e9-979d-d2df87c4bb56.png So, that’s fine for now.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jbt/markdown-editor/issues/101?email_source=notifications&email_token=AB5JHVWCHSSE3MMZULLXBEDQQRHVFA5CNFSM4GP3ZIDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKJFQY#issuecomment-546607811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5JHVTR4BLCZ2TJW5D7XILQQRHVFANCNFSM4GP3ZIDA .

1reaction
aero31aerocommented, Jan 14, 2019

The simplest solution could be a mode where you can disable warnings and such highlights. Fixing the syntax highlighting would require diving into the source of codemirror or updating codemirror and seeing if the latest version has fixed it.

Unfortunately I don’t have time these days for making a detailed fix, but a disable-warnings mode or subtler warning CSS is on the way.

On Mon, Jan 14, 2019, 10:32 PM Draco18s <notifications@github.com wrote:

For example:

Thing 1 Description
HTML First some html.
  • One
  • Twp
< Don’t do this, everything goes to hell
Other line RED MODE ACTIVATED
' No more red

As it appears in the editor: [image: image] https://user-images.githubusercontent.com/1750680/51127043-30cc6b00-17ea-11e9-8167-a16a5ce499dc.png

Editable version https://jbt.github.io/markdown-editor/#dY7NCsIwEITvPsXcvNgW76FQrKJgLUjw5KGgSxNIE0lWRejDm/4cdS87u8s3Oz3mkkrbFut56qdWUrh5/WDt7Lxf9MnP+rNOIoC9rI7Rcad9YATXERR3JhVPkwuj89qSyGIftHw/Jp3F4/ANzVU0ES6dXTLuDqx0WIFe5D88Rm4dBbCDImNGomZFHkZbitx5W6Kqyy2KjTxcChnH0TUfTE8OnfMET/cUB16GmHGgvg==

Note that the < cannot be replaced with < as that displays as a literal < and it’s the single quotes in the text description that gets the red treatment, which will continue until either another ’ is found (anywhere) or the end of the file is reached. Nor can the ’ or '< be escaped (e.g. ' or <).

This makes it particularly frustrating to edit the markdown page for a custom esolang where < one command and I require a bulleted list in the description for another command (as it does multiple things, based on its inputs) and the syntax highlighting in this case makes the text under it nearly impossible to read.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbt/markdown-editor/issues/101, or mute the thread https://github.com/notifications/unsubscribe-auth/AHqT1urs3Wo2lHDCHYwB2P_rxkzZlsOtks5vDLgSgaJpZM4Z-8oG .

Read more comments on GitHub >

github_iconTop Results From Across the Web

A case against syntax highlighting - Linus Åkesson
Background. Syntax highlighting is a standard feature of most modern text editors and development environments. The basic idea is to exaggerate ...
Read more >
syntax.txt - Vim
Vim supports syntax highlighting on all terminals. But since most ordinary terminals have very limited highlighting possibilities, it works best in the GUI ......
Read more >
Highlight the difference between two strings in PHP
Just wrote a class to compute smallest (not to be taken literally) number of edits to transform one string into another string:.
Read more >
Bikeshed Documentation - GitHub Pages
inline links, with optional title. It does not recognize "autolinks" (surrounded by <> characters), images, or "hard line breaks"; use HTML for ...
Read more >
HTML5 - W3C
A list of current W3C publications and the latest revision of this ... The elements of HTML: Each element has a predefined meaning, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found