From a881c428c12f4948e4ea65b9315a3fabef8c7b4f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 18 Nov 2016 10:17:40 -0500 Subject: munge links & urls for sections: toc, endnotes, book index --- src/sdp/ao_rgx.d | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/sdp/ao_rgx.d') diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d index 68a16c1..73cdb40 100644 --- a/src/sdp/ao_rgx.d +++ b/src/sdp/ao_rgx.d @@ -142,11 +142,12 @@ template RgxInit() { static inline_al_delimiter_open_asterisk = ctRegex!(`【\*`, "m"); static inline_al_delimiter_open_plus = ctRegex!(`【\+`, "m"); static inline_text_and_note_al = ctRegex!(`(?P.+?)【(?:[*+ ]*)(?P.+?)】`, "mg"); - static inline_url = ctRegex!(`((?:https?|git):\/\/\S+)`, "mg"); - static inline_link_naked_url = ctRegex!(`(^|[ ])((?:https?|git):\/\/\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); - static inline_link_markup_regular = ctRegex!(`(^|[ ])\{\s*(.+?)\s*\}((?:https?|git):\/\/\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); - static inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(.+?)\}((?:https?|git):\/\/\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); - static inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(.+?)\}((?:https?|git):\/\/\S+)`, "mg"); + static inline_url = ctRegex!(`((?:(?:https?|git):\/\/|\.\.\/|\.\/|#)\S+)`, "mg"); + static inline_link_naked_url = ctRegex!(`(^|[ ])((?:(?:https?|git):\/\/|\.\.\/|\.\/|#)\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); + static inline_link_markup_regular = ctRegex!(`(^|[ ])\{\s*(.+?)\s*\}((?:(?:https?|git):\/\/|\.\.\/|\.\/|#)\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); + static inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(.+?)\}((?:(?:https?|git):\/\/|\.\.\/|\.\/|#)\S+?)([.,;:?!]?(?:[ ]|$))`, "mg"); + static inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(.+?)\}((?:(?:https?|git):\/\/|\.\.\/|\.\/|#)\S+)`, "mg"); + static inline_a_url = ctRegex!(`(┤)(\S+?)(├)`, "mg"); /+ inline markup book index +/ static book_index = ctRegex!(`^=\{\s*(.+?)\}$`, "m"); static book_index_open = ctRegex!(`^=\{\s*([^}]+?)$`); -- cgit v1.2.3