An example from php markdown readme: . *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium The HTML specification is maintained by the W3C. .
The HTML specification is maintained by the W3C.
. They can be multiline (see pandoc implementation). Not sure about newlines, but we should at least skip those definitions: . *[ foo bar ]: desc foo .foo
. They can contain arbitrary markup (see pandoc implementation): . *[`]:`]: foo \`]:\` .`]:`
. Can contain matched brackets: . *[[abbr]]: foo [abbr] .[abbr]
. No empty abbreviations: . *[foo]: foo .*[foo]: foo
. Intersecting abbreviations (first should match): . *[Bar Foo]: 123 *[Foo Bar]: 456 Foo Bar Foo Bar Foo Bar .Foo Bar Foo
Bar Foo Bar
. Don't bother with nested abbreviations (yet?): . *[JS]: javascript *[HTTP]: hyper text blah blah *[JS HTTP]: is awesome JS HTTP is a collection of low-level javascript HTTP-related modules .JS HTTP is a collection of low-level javascript HTTP-related modules
. Don't match the middle of the string: . *[foo]: blah *[bar]: blah foobar .foobar
.