Skip to content

Support unquoted href attributes in links - #133

Open
samipuro wants to merge 1 commit into
mtibben:masterfrom
samipuro:fix/unquoted-link-href
Open

samipuro wants to merge 1 commit into
mtibben:masterfrom
samipuro:fix/unquoted-link-href

Conversation

@samipuro

Copy link
Copy Markdown

Fixes #95.

<a href=http://example.com>Link</a> lost its URL because the link pattern required a quoted href. The pattern now also accepts an unquoted value. It uses a branch reset group (?|...), so the capture group numbers used by pregCallback() stay the same. Quoted links and empty hrefs behave exactly as before, and an unquoted link renders the same as its quoted version.

Added LinkTest::testUnquotedHref.

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

Successfully merging this pull request may close these issues.

links don't work without quotes

1 participant