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

Title underlining (i.e. ====) seems unreliable #9

Open
Shungy opened this issue Jan 16, 2019 · 2 comments
Open

Title underlining (i.e. ====) seems unreliable #9

Shungy opened this issue Jan 16, 2019 · 2 comments

Comments

@Shungy
Copy link

Shungy commented Jan 16, 2019

You need to have the same or more number of = signs under the title otherwise it doesn't detect it. This might be expected behaviour, however some unicode characters seem to count as multiple chars. So the following will be interpreted as a paragraph:

test †
======

To make it interpreted as a level one header it needs two more equal signs:

test †
========

I think if you don't take the number of chars in the title into the account and just assume any line on top of 3 or more equal signs as a level one header it would be more reliable and give you the expected output every time.

@hiltjo
Copy link

hiltjo commented May 13, 2021

Just FYI, if you change the following line:

smu/smu.c

Line 561 in 2a8d5b1

if(j >= l) {

To for example:

if (j == l || (p[j] == '\n' && j > 3)) {

It will work. Other Markdown parsers handle it this way too. Tested with "discount" and "lowdown".

@bztsrc
Copy link

bztsrc commented Jul 11, 2022

It will work.

Nope, it will fail on this example:

ábc
===

I think the best would be to simply use

if(j >= 3) {

Cheers,
bzt

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