facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

(Bug) Incorrect preview when trying to insert italics within brackets in a bold text #83

Closed deutranium closed 4 years ago

deutranium commented 5 years ago

Sublime Text Version : 3.2.1 Browser : Firefox 68.0.1 Parser : Markdown

When I try to add some text enclosed within brackets inside some bold text, and try to make it italic, the complete text doesn't remain bold, and something like that illustrated below is seen in the preview

Sample text:

**Lorem Ipsum *(Dolor)* sit amet**

Expected output as seen on Github:

Expected output

Actual output as seen using Markdown Preview: Preview in Browser -> markdown:

Actual output

EDIT: The expected output is seen when using Github as the parser, so maybe it is a parser specific issue

facelessuser commented 5 years ago

This is upstream in the betterem extension of [pymdown-extensions](. Particularly when dealing with non-word characters. A potential fix has been submitted, at some point it will be backported to the current Sublime dependency.

If this is an issue before the change makes it back here, you can change to using **Lorem Ipsum _(Dolor)_ sit amet**, or do not use betterem.

facelessuser commented 5 years ago

Tests show that this issue is now fixed in the BetterEm rework branch: https://github.com/facelessuser/pymdown-extensions/pull/516/commits/0c350d764724ce7bad50033c86a7d6f18a4de937.

I will leave this open only for others running into the same issue to know what is going on. Once the fix is backported to the Sublime dependency or the version of the dependency is updated to the latest (requires Python Markdown update as well), the issue will be resolved.

facelessuser commented 5 years ago

I'm hoping to upgrade Python Markdown in a week or so. Python Markdown, pymdown-extensions will both get upgraded. This will effectively fix this issue. I don't think a change will need to be made here, but it may be possible.

facelessuser commented 4 years ago

I've upgraded the Python Markdown library and Pymdown Extensions library. This should be fixed once systems upgrade the dependencies. If it doesn't update (it may take an hour or two to actually trigger an update) you can try running Satisfy dependencies from the control panel, and if everything installs okay in the console, restart Sublime.