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

HR lines written with consecutive - characters are superseded by empty headings #190

Open
kees- opened this issue Jan 3, 2023 · 1 comment

Comments

@kees-
Copy link

kees- commented Jan 3, 2023

Using 1.11.4

I would PR but I'm not sure the exact cause.

Behavior

This markup:


***

- - -

---

-----

that presumably should be output as

<hr>
<hr>
<hr>
<hr>

is instead transformed to:

<hr>
<hr>
<h2></h2>
<h2></h2>

I believe because empty-line comes before hr in the list of transformers? The h1? and h2? heading checks, present in empty-line, register true for = and - HRs. Or something else...

Would it be as simple as adding hr to the conditions of empty-line here? Or should checks be rewritten, transformers reordered etc. Thanks!

@kees- kees- changed the title HR lines written with consecutive - characters are superseded by the empty-line transformer HR lines written with consecutive - characters are superseded by empty headings Jan 3, 2023
@yogthos
Copy link
Owner

yogthos commented Jan 3, 2023

That sounds like it might be an issue. Would need a bit of experimentation to make sure though. If adding a check for hr in the empty-line handler doesn't break existing tests then I think that would be fine to make the change. It's probably the easiest fix.

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

No branches or pull requests

2 participants