Hash :
74e5f7a9
Author :
Date :
2024-01-16T14:56:09
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
# Permissive E-mail Autolinks
With the flag `MD_FLAG_PERMISSIVEEMAILAUTOLINKS`, MD4C enables more permissive
recognition of e-mail addresses and transforms them to autolinks, even if they
do not exactly follow the syntax of autolink as specified in CommonMark
specification.
This is standard CommonMark e-mail autolink:
```````````````````````````````` example
E-mail: <mailto:john.doe@gmail.com>
.
<p>E-mail: <a href="mailto:john.doe@gmail.com">mailto:john.doe@gmail.com</a></p>
.
--fpermissive-email-autolinks
````````````````````````````````
With the permissive autolinks enabled, this is sufficient:
```````````````````````````````` example
E-mail: john.doe@gmail.com
.
<p>E-mail: <a href="mailto:john.doe@gmail.com">john.doe@gmail.com</a></p>
.
--fpermissive-email-autolinks
````````````````````````````````
`+` can occur before the `@`, but not after.
```````````````````````````````` example
hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.
.
<p>hello@mail+xyz.example isn't valid, but <a href="mailto:hello+xyz@mail.example">hello+xyz@mail.example</a> is.</p>
.
--fpermissive-email-autolinks
````````````````````````````````
`.`, `-`, and `_` can occur on both sides of the `@`, but only `.` may occur at
the end of the email address, in which case it will not be considered part of
the address:
```````````````````````````````` example
a.b-c_d@a.b
a.b-c_d@a.b.
a.b-c_d@a.b-
a.b-c_d@a.b_
.
<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a></p>
<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a>.</p>
<p>a.b-c_d@a.b-</p>
<p>a.b-c_d@a.b_</p>
.
--fpermissive-email-autolinks
````````````````````````````````