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

http:// links don't have space before and after #28

Open
ershov opened this issue Jun 24, 2016 · 2 comments
Open

http:// links don't have space before and after #28

ershov opened this issue Jun 24, 2016 · 2 comments

Comments

@ershov
Copy link

ershov commented Jun 24, 2016

In line 249 there should be spaces before and after the link:
str = str.replace(stra[0], ' <a ' + micromarkdown.mmdCSSclass(repstr, strict) + 'href="' + repstr + '">' + repstr + '</a> ');
because the regex captures them and they get removed after replacement:
url2: /[ \t\n]([a-zA-Z]{2,16}:\/\/[a-zA-Z0-9@:%_\+.~#?&=]{2,256}.[a-z]{2,4}\b(\/[\-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?)[ \t\n]/g

@ershov
Copy link
Author

ershov commented Jun 24, 2016

Also, this regex eats up the leading/training space which breaks formatting.

@ershov
Copy link
Author

ershov commented Jun 24, 2016

One more bug at lines 190 and 192 in links processing: '\n' sometimes adds unnecessary linebreaks.

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

1 participant