Giter Club home page Giter Club logo

Comments (8)

adunndevster avatar adunndevster commented on September 13, 2024 5

@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.

highlightjs/highlight.js#3456

from stacks-editor.

Glorfindel83 avatar Glorfindel83 commented on September 13, 2024 4

Probably related bug when editing https://meta.stackexchange.com/a/363991/295232:
Screenshot 2021-05-03 at 15 04 02

from stacks-editor.

b-kelly avatar b-kelly commented on September 13, 2024

@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.

V2Blast avatar V2Blast commented on September 13, 2024

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.

yellis avatar yellis commented on September 13, 2024

@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.

b-kelly avatar b-kelly commented on September 13, 2024

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.

yellis avatar yellis commented on September 13, 2024

@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.

yellis avatar yellis commented on September 13, 2024

@b-kelly I just added:

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.