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

Typography extension breaks some auto links #300

Closed
maxcom opened this issue Jan 21, 2019 · 4 comments
Closed

Typography extension breaks some auto links #300

maxcom opened this issue Jan 21, 2019 · 4 comments

Comments

@maxcom
Copy link

maxcom commented Jan 21, 2019

I use Autolink and TypographicExtension and I found that some URL's are incorrectly linked. For example link https://youtu.be/L1--OW4j0Pw is converted to https://youtu.be/L1–OW4j0Pw. Autolink then chooses only first part of link, https://youtu.be/L1.

I expect that typography extension do not replace -- in URL.

@vsch vsch added the 🪲 bug label Jan 21, 2019
@vsch
Copy link
Owner

vsch commented Jan 21, 2019

@maxcom, yes it is an omission in auto-link processing. Each text node is taken separately for link processing.

Typographic extension breaks up a single text node to insert a typographic node.

I added code to auto-link extension to combine following TypographicText nodes and Text nodes if they don't have spaces between them and process the combined text.

All nodes involved in processing are removed from the AST, except trailing ones which had no links.

It may have side-effect of removing valid typographic nodes but I will address this as the test cases are found.

@vsch
Copy link
Owner

vsch commented Jan 21, 2019

Fix for this is available. Repo updated, maven updated but may take a while to show up in maven central.

@vsch
Copy link
Owner

vsch commented Jan 22, 2019

@maxcom, found the use case causing removal of typographic text nodes. #301

Fixed for next release. If it is an issue you are encountering please let me know and I will make a release. Otherwise, I will wait to accumulate a few other bug fixes before releasing.

@maxcom
Copy link
Author

maxcom commented Jan 22, 2019

Thank you.

@vsch vsch closed this as completed Feb 23, 2019
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