vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Problems rendering adjacent bold and italics

Open tedhudek opened this issue 10 years ago • 8 comments

  • VSCode Version: 0.10.11
  • OS Version: Win10

Steps to Reproduce:

  1. Render this text in VS Code: Methods are named AbcObjectAction, where Object describes the object and Action indicates what the function does. For example, AbcDeviceCreate creates a device object.
  2. Compare to GitHub rendering. Having bold adjacent to italics causes Code to stay in italics mode after the closing italics marker.

tedhudek avatar Mar 25 '16 00:03 tedhudek

Reproduces in latest

image

Tyriar avatar Mar 27 '16 03:03 Tyriar

Examples to test: (note that they all render correctly on GitHub)

italicsbold

bolditalicsbolditalics

bolditalics

_bold_

tedhudek avatar Mar 28 '16 17:03 tedhudek

image

Tyriar avatar Mar 28 '16 17:03 Tyriar

Using _ for italics works fine: italicsbold bolditalicsbolditalics bolditalics bold

gregvanl avatar Mar 28 '16 17:03 gregvanl

It looks like the specific issue is that the current markdown parser does not consider adjacent * styles. See how the breakage first occurs in *** styles, treating **bold***... as ``bold*...`

The last one is the exception to this, it would seem as though ** takes precedence over *** for some reason.

Tyriar avatar Mar 28 '16 17:03 Tyriar

I cannot reproduce with our new markdown extension.

bpasero avatar Jun 16 '16 16:06 bpasero

Some more problem cases:

****bold italics****
****bold italics****
****bold italics****


\*\*\**italics****

Output on GitHub:

_bold italics_ _bold italics_ _bold italics_

italics

VS Code @ 93e65224d7598017bfa0b188a0d82b66a2ee9698:

image

Tyriar avatar Jun 16 '16 19:06 Tyriar

This issue was moved to Microsoft/vscode-markdown-tm-grammar#7

mjbvz avatar Feb 09 '18 22:02 mjbvz