Skip to content

Lone quote in heading text breaks trailing-attribute detection #23

Description

@PiotrCzapla

A lone ' or " in heading text breaks trailing-attribute detection.

Ok (without quotes):

from mdhtml import to_mdhtml
print(to_mdhtml('# Alpha beta {k="v"}'), end="")
<h1 k="v">Alpha beta</h1>

Broken:

print(to_mdhtml("# Alpha's beta {k=\"v\"}"), end="")
<h1>Alpha's beta {k="v"}</h1>

Broken:

print(to_mdhtml("# [Alpha]{.cls} the firm's charter {k=\"v\"}"), end="")
<h1 class="cls}" firm's charter {k="v">[Alpha]</h1>

https://share.solveit.pub/d/9c078ad0441301956d58171fece9c4ac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions