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

The Markdown support works poorly with nested markups #919

Open
ParadoxV5 opened this issue Aug 21, 2022 · 0 comments
Open

The Markdown support works poorly with nested markups #919

ParadoxV5 opened this issue Aug 21, 2022 · 0 comments

Comments

@ParadoxV5
Copy link

ParadoxV5 commented Aug 21, 2022

(rdoc --version: 6.4.0)

RDoc (and by extension, YARD out-of-the-box) has Markdown support, but it doesn’t work correctly when it comes to nested emphasis/strong text, in-line code and links.

Refer to the sample I’ve provided. I’ve included both popular style (backtick for code, square-round brackets for link) and RDoc style (plus for code, curly-square for link).

Input
*`1_tick`*

*+1_plus+*

`*tick_1*`

+*plus_1*+

**`2_tick`**

**+2_plus+**

`**tick_2**`

+**plus_2**+

[*square_1*](https://example.org)

{*curly_1*}[https://example.org]

*[1_square](https://example.org)*

*{1_curly}[https://example.org]*

[**square_2**](https://example.org)

{**curly_2**}[https://example.org]

**[2_square](https://example.org)**

**{2_curly}[https://example.org]**

[`square_tick`](https://example.org)

{`curly_tick`}[https://example.org]

`[tick_square](https://example.org)`

`{tick_curly}[https://example.org]`

[+square_plus+](https://example.org)

{+curly_plus+}[https://example.org]

+[plus_square](https://example.org)+

+{plus_curly}[https://example.org]+
Expected (formatted in GitHub Markdown)

1_tick

1_plus

*tick_1*

*plus_1*

2_tick

2_plus

**tick_2**

**plus_2**

square_1

curly_1

1_square

1_curly

square_2

curly_2

2_square

2_curly

square_tick

curly_tick

[tick_square](https://example.org)

{tick_curly}[https://example.org]

square_plus

curly_plus

[plus_square](https://example.org)

{plus_curly}[https://example.org]

Actual (copy-pasted verbatim from output HTML’s source)

1_tick

1_plus

tick_1

+plus_1+

2_tick

2_plus

tick_2

+plus_2+

{square_1}

{curly_1}

{1_square}[https://example.org]

{1_curly}[https://example.org]

{square_2}

{curly_2}

{2_square}[https://example.org]

{2_curly}[https://example.org]

{square_tick}

{curly_tick}

[tick_square](https://example.org)

{tick_curly}[https://example.org]

{square_plus}

{curly_plus}

+plus_square+

+plus_curly+

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

No branches or pull requests

1 participant