diff options
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 1677aed..f60fa60 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -525,6 +525,7 @@ template SiSUdocAbstraction() { } else if (to!int(an_object["lev_markup_number"]) < 4) { segment_object_belongs_to = ""; } + _anchor_tag=to!string(obj_cite_number); the_table_of_contents_section = obj_im.table_of_contents_gather_headings( an_object, dochead_make_aa, @@ -2345,6 +2346,49 @@ template SiSUdocAbstraction() { rgx.inline_notes_curly_sp_plus, (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c) ); + /+ url matched +/ + if (auto m = matchAll(obj_txt_in, rgx.inline_url)) { + /+ link: naked url: http://url +/ + if (match(obj_txt_in, rgx.inline_link_naked_url)) { + obj_txt_in = + replaceAll( + obj_txt_in, + rgx.inline_link_naked_url, + ("$1" ~ mkup.lnk_o ~ " $2 " ~ mkup.lnk_c ~ mkup.url_o ~ "$2" ~ mkup.url_c ~ "$3") // ("$1{ $2 }$2$3") + ); + } + /+ link with helper for endnote including the url: + {~^ link which includes url as footnote }http://url + maps to: + { link which includes url as footnote }http://url~{ { http://url }http://url }~ + +/ + if (match(obj_txt_in, rgx.inline_link_endnote_url_helper)) { + obj_txt_in = + replaceAll( + obj_txt_in, + rgx.inline_link_endnote_url_helper_punctuated, + (mkup.lnk_o ~ " $1 " ~ mkup.lnk_c ~ mkup.url_o ~ "$2" ~ mkup.url_c ~ "~{ " ~ mkup.lnk_o ~ " $2 " ~ mkup.lnk_c ~ mkup.url_o ~ "$2" ~ mkup.url_c ~ " }~$3") // ("{ $1 }$2~{ { $2 }$2 }~$3") + ); + obj_txt_in = + replaceAll( + obj_txt_in, + rgx.inline_link_endnote_url_helper, + (mkup.lnk_o ~ " $1 " ~ mkup.lnk_c ~ mkup.url_o ~ "$2" ~ mkup.url_c ~ "~{ " ~ mkup.lnk_o ~ " $2 " ~ mkup.lnk_c ~ mkup.url_o ~ "$2" ~ mkup.url_c ~ " }~") // ("{ $1 }$2~{ { $2 }$2 }~") + ); + } + /+ link with regular markup: + { linked text or image }http://url + +/ + if (match(obj_txt_in, rgx.inline_link_markup_regular)) { + obj_txt_in = + replaceAll( + obj_txt_in, + rgx.inline_link_markup_regular, + ("$1" ~ mkup.lnk_o ~ " $2 " ~ mkup.lnk_c ~ mkup.url_o ~ "$3" ~ mkup.url_c ~ "$4") // ("$1{ $2 }$3$4") + ); + } + } + /+ endnotes (regular) +/ obj_txt_in = replaceAll( obj_txt_in, |