core: include trailing "_" and "!" characters in links (#6973)

* core: include trailing "_" and "!" characters in links

* docs: plan for keeping trailing "_" and "!" in links
This commit is contained in:
Narasimha-sc
2026-05-13 15:45:39 +00:00
committed by GitHub
parent c82bf05293
commit 3b4bf92015
3 changed files with 157 additions and 0 deletions
+2
View File
@@ -302,6 +302,8 @@ markdownP = mconcat <$> A.many' fragmentP
isPunctuation' = \case
'/' -> False
')' -> False
'_' -> False
'!' -> False
c -> isPunctuation c
isUri s = T.length s >= 10 && any (`T.isPrefixOf` s) ["http://", "https://", "simplex:/"]
-- matches what is likely to be a domain, not all valid domain names