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

Bug with newline in link text #167

Closed
neffets opened this issue Jul 10, 2016 · 3 comments
Closed

Bug with newline in link text #167

neffets opened this issue Jul 10, 2016 · 3 comments

Comments

@neffets
Copy link

neffets commented Jul 10, 2016

  1. Try following raw text
E-Mail: "Line-1
":mailto:[email protected]

there the newline is ignored and it will lead to Link:

E-Mail: <a href="mailto:[email protected]">Line-1</a>
  1. But it will genrate buggy html if something is written in line two (Branch: origin/3.5, and same on txstyle.org)
E-Mail: "Line-1
Line-2":mailto:[email protected]

this will leave a link-prefix "textileRef:..." in the html output

E-Mail: textileRef:892738635782b165ee7c7:linkStartMarker:“Line-1<br />
Line-”:mailto:[email protected]

strange the "2" from Line-2 is lost too.

Branch: origin/3.5

@neffets
Copy link
Author

neffets commented Jul 10, 2016

Problem is in function replaceLinks

There are 2 bugs

  • Bug 1: The P-inner does not detect the newlines
    it could be fixed with /xs instead of /x
  • Bug 2: if it cannot detect correct links.
    It should remove the "textileRef:...." at end of processing. All not found links should remove their "textileRef..." at end!

@netcarver
Copy link
Contributor

Hello @neffets. Both these defects were fixed some time ago and you should find that the master branch does not exhibit either of these. I note, however, that txstyle.org is still running an old version of textile. I'll look into getting that updated once the latest changes (such as #168) make it into master.

@neffets
Copy link
Author

neffets commented Jul 27, 2016

see #168 : "issue-168" branch / master have fixed this bug. with "master" a linktext-with-newline works

@neffets neffets closed this as completed Jul 27, 2016
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