-
-
Notifications
You must be signed in to change notification settings - Fork 2
links with underscores linked incorrectly #10
Comments
maybe it's not smartpunct related, as this is also wrongly rendered: https://eventum.example.net/history.php?iss_id=107092
https://gitlab.example.net/group/project/merge_requests/39#note_150630 while link alone is correct:
|
indeed. disabled smartpunct and problems persist |
…league/commonmark-ext-autolink#10) This feature was originally introduced in 0.18.2.
This is a bug with Basically, it would take an AST similar to this (from the new unit test I'm adding): $paragraph = new Paragraph();
$paragraph->appendChild(new Text('https://eventum.example.net/history.php?iss'));
$paragraph->appendChild(new Text('_'));
$paragraph->appendChild(new Text('id=107092'));
$paragraph->appendChild(new Newline(Newline::SOFTBREAK));
$paragraph->appendChild(new Text('https://gitlab.example.net/group/project/merge'));
$paragraph->appendChild(new Text('_'));
$paragraph->appendChild(new Text('requests/39#note'));
$paragraph->appendChild(new Text('_'));
$paragraph->appendChild(new Text('150630')); And should have collapsed the adjoining $paragraph->appendChild(new Text('https://eventum.example.net/history.php?iss_id=107092'));
$paragraph->appendChild(new Newline(Newline::SOFTBREAK));
$paragraph->appendChild(new Text('https://gitlab.example.net/group/project/merge_requests/39#note_150630')); But due to the implementation bug, it actually did something closer to this: $paragraph->appendChild(new Text('https://eventum.example.net/history.php?iss_id=107092'));
$paragraph->appendChild(new Newline(Newline::SOFTBREAK));
$paragraph->appendChild(new Text('https://gitlab.example.net/group/project/merge'));
$paragraph->appendChild(new Text('_'));
$paragraph->appendChild(new Text('requests/39#note'));
$paragraph->appendChild(new Text('_'));
$paragraph->appendChild(new Text('150630')); See how that second link is still split across multiple I'm preparing a fix and release for this now :) |
thanks. super! |
fixes autolink text nodes collapse: - https://github.com/thephpleague/commonmark-ext-autolink/issues/10<Paste>
fixes autolink text nodes collapse: - https://github.com/thephpleague/commonmark-ext-autolink/issues/10<Paste>
fixes autolink text nodes collapse: - https://github.com/thephpleague/commonmark-ext-autolink/issues/10<Paste>
smartpunct and autolink don't play well
input:
output:
remove the apostrophe
’
and links get formatted properly:wait, the second link still wrong.
doesn't matter which apostrophe being used, or are they in pairs:
it's
,it's '
...versions (if that's relevant):
The text was updated successfully, but these errors were encountered: