Searched hist:"4 f32c45be746b2e49db6bcc6cc733a89bbd14d81" (Results 1 – 2 of 2) sorted by relevance
| /dokuwiki/inc/Parsing/ParserMode/ |
| H A D | GfmLink.php | 4f32c45be746b2e49db6bcc6cc733a89bbd14d81 Tue May 26 20:05:54 UTC 2026 Andreas Gohr <gohr@cosmocode.de> GfmLink: allow soft line break inside link text
The label character class explicitly forbade `\n`, so a CommonMark soft line break inside link text (e.g. `[link with<EOL>more](url)`) fell through to literal text instead of producing a link. Loosen the class to accept a bare `\n` as long as it is not followed by a blank line — soft breaks are spec-allowed inside link text, blank lines are not, and refusing them also keeps `\n#`-anchored block modes (header, hr, ...) from being swallowed by a runaway link match.
The `\n` survives into the label string and renders as a literal line ending in HTML, which browsers display as a single space. This soft break behavior has been checked against https://spec.commonmark.org/dingus/
Note that this behavior differs from github where the line break is rendered as a hard break <br>.
|
| /dokuwiki/_test/tests/Parsing/ParserMode/ |
| H A D | GfmLinkTest.php | 4f32c45be746b2e49db6bcc6cc733a89bbd14d81 Tue May 26 20:05:54 UTC 2026 Andreas Gohr <gohr@cosmocode.de> GfmLink: allow soft line break inside link text
The label character class explicitly forbade `\n`, so a CommonMark soft line break inside link text (e.g. `[link with<EOL>more](url)`) fell through to literal text instead of producing a link. Loosen the class to accept a bare `\n` as long as it is not followed by a blank line — soft breaks are spec-allowed inside link text, blank lines are not, and refusing them also keeps `\n#`-anchored block modes (header, hr, ...) from being swallowed by a runaway link match.
The `\n` survives into the label string and renders as a literal line ending in HTML, which browsers display as a single space. This soft break behavior has been checked against https://spec.commonmark.org/dingus/
Note that this behavior differs from github where the line break is rendered as a hard break <br>.
|