Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown starting BOLD embedded in ITALICS renders wrongly within the editor #159

Closed
JesseSteele opened this issue Mar 13, 2024 · 5 comments
Assignees

Comments

@JesseSteele
Copy link

JesseSteele commented Mar 13, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.2
  • OS Version: Linux x64 6.1.77-2-MANJARO

Problem:

  • This is not about Markdown rendered on a page.
  • This is about Markdown rendered inside the editor.

Steps to Reproduce:

  1. Copy-paste the following code block into any markdown file:
- Incorrectly rendered in the editor:

***Chocolate** and **cookies** are separate topics*
***Starting Bold** and **then more bold** in an asterisk italics line, but the entire line should appear as italics*
___Starting Bold__ and __then more bold__ in an underscore italics line, but as plain text when the line is italics_
***Starting bold** without more bold in an asterisk italics line also renders incorrectly: as bold when the line is italics*
___Starting bold__ without more bold in an underscore italics line also renders incorrectly: as plain text when the line is italics_

- Correctly rendered in the editor:

_**Chocolate** and **cookies** are separate topics_
***Chocolate* and *cookies* are separate topics** - as an asterisk bold line
__*Chocolate* and *cookies* are separate topics__ - as an underscore bold line
***Starting italics* with asterisk italics inside an asterisk bold line renders the line correctly in the editor: as a bold line**
**_Starting italics_ with underscore italics inside an asterisk bold line renders the line correctly in the editor: as a bold line**
*One **bold** word deep inside asterisk italics renders the line correctly **and sometimes bold** in the editor*
_One **bold** word deep inside underscore italics renders the line correctly **and sometimes bold** in the editor_
**A bold line *with asterisk italics deep inside* renders the line correctly *with more italics* in the editor**
**A bold line _with underscore italics deep inside_ renders the line correctly _with more italics_ in the editor**
@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.87.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@JesseSteele
Copy link
Author

It is updated to 1.87.2 and the problem persists.

@JesseSteele
Copy link
Author

JesseSteele commented Mar 13, 2024

Comment for the PM and engineers:

The VS Code editor only renders bold OR italics, not bold AND italics. It might be easier for engineers to fix this bug as part of including a bold italics markdown class rendered inside the editor also.

...because...

Essentially this is a glitch in permutation of styling that comes from failure to recognize bold italics, then whether that bold italics is inside another bold line or inside another italics line.

Solve the permutation workflow:

  1. Identify whether a long string is plain text, bold, or italics.
  2. Recognize bold italics inside that string.
  3. Make sure this can work with multiple styled long strings on the same line.

@JesseSteele
Copy link
Author

...Thanks @mjbvz Matt!

@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 13, 2024
@JesseSteele JesseSteele changed the title Markdown starting BOLD embedded in ITALICS renders wrongly with in the editor Markdown starting BOLD embedded in ITALICS renders wrongly within the editor Mar 14, 2024
@mjbvz
Copy link
Contributor

mjbvz commented Mar 20, 2024

Duplicate of #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants