Comments (8)
@b-kelly - I've submitted a fix for this issue into the highlight.js. Maybe you can help promote the PR?
It was SUPER simple. Really the parser was just being over vigilant in trying to match the ending characters for bold/italics.
from stacks-editor.
Probably related bug when editing https://meta.stackexchange.com/a/363991/295232:
from stacks-editor.
@Glorfindel83 Agreed, that looks related to me and is likely due to the mixing of *
(emphasis) and **
(strong emphasis). We use highlight.js as the backing syntax highlighter, which uses regex to detect syntax. My guess is that the regex is not perfect in this scenario and is causing this issue.
Without committing to a specific timeline here (stay tuned), this is relatively high on our priority list to address.
from stacks-editor.
I just encountered that bold-and-italics problem myself (well, I noticed it a while ago; I just didn't figure out the source of the problem until now). I also noticed something else: If the bolded-and-italicized text occurs within a blockquote, then the rest of the text from that point onwards is also displayed as if it’s grayed-out (i.e. as if it were part of a blockquote), as well as bolded and italicized.
(Another issue with the Stacks editor’s inline preview/"highlighting" in Markdown mode that doesn't seem to have been mentioned above: It behaves as if the syntax for italics/bold formatting works across multiple lines (e.g. with the opening *
being on one line and the closing *
being on a different line) – even though that's not how the post will actually be rendered when the post is saved.
from stacks-editor.
@b-kelly given that highlightjs/highlight.js#3457 was merged into hljs, is this resolved now (at least in part)? Is stacks editor up to date with hljs?
from stacks-editor.
Stacks-Editor should be up-to-date with hljs (check package.json for exact version). This issue however still needs a ton of work, likely involving a massive amount of upstream changes or switching to a different highlighting approach entirely (for markdown mode, not the rich-text or baked post).
from stacks-editor.
@b-kelly is it possible to fully define the project somewhere and to potentially break down the work needed into smaller bits?
from stacks-editor.
@b-kelly I just added:
- https://meta.stackexchange.com/a/380383/51 - adds formatting based on escaped md symbols
- https://meta.stackexchange.com/a/380381/51 -
lang-*
doesnt work for highlighting in RT (works on site)
Hopefully will also be addressed in your suggested approach.
If either isn't included here, we should split off into separate issues.
from stacks-editor.
Related Issues (20)
- v0.8 remove default renderer, Could you some one give me a sample with mathjax3 HOT 1
- docx4J with grails groovy. Good evening team, I have a problem. when I want to recover my content controls from my docx file it corrupts my output file. I really need help. Thanks in advance HOT 1
- Add the ability to remove references to Meta tags in the menu bar
- Support non-focusable disabled state.
- Cannot use a `|` character in table header
- bug(markdown) Code blocks surrounded by single backtick then triple backticks
- Inline code marks allow other marks applied to their content
- bug (markdown with preview) [meta-tag:tag-name] is rendered as plaintext in preview HOT 2
- Escaping '#' inside bullet lists doesn't round-trip
- Don't apply formatting in the raw Markdown editor when Markdown preview is enabled HOT 6
- Css isolation help angular HOT 1
- Markdown Mode: Support using Shift + Enter to add newline
- Try to embed image in HOT 3
- Reporting a vulnerability
- Editor menu dropdowns are missing a11y role attributes HOT 1
- Math formulas support HOT 1
- Distribution code is missing from repo HOT 2
- Task list support HOT 1
- Scope CSS Styles to the Editor only HOT 1
- Offer a callback for Content changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacks-editor.