From a263d67a5dfb5fad70059f63c1029f9174bf7ff0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 30 Apr 2018 21:05:13 -0400 Subject: link url matching - smid: sisu markup identify - inline_link_markup_regular matches series of marked up urls, e.g. { link txt }http://url, { link txt }http://url --- org/output_xmls.org | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'org/output_xmls.org') diff --git a/org/output_xmls.org b/org/output_xmls.org index 6ac5c76..0cbde63 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -584,10 +584,10 @@ string lev4_heading_subtoc(O)( lev4_subtoc ~= "
\n"; foreach (subtoc; obj.lev4_subtoc) { if (auto m = subtoc.match(rgx.inline_link_subtoc)) { - auto indent = to!string(m.captures[1]); - auto text = to!string(m.captures[2]); + auto indent = m.captures[1].to!string; + auto text = m.captures[2].to!string; text = font_face(text); - auto link = to!string(m.captures[3]); + auto link = m.captures[3].to!string; lev4_subtoc ~= subtoc.replaceFirst(rgx.inline_link_subtoc, format(q"ΒΆ

%s @@ -854,7 +854,7 @@ auto para_seg(O)( string _suffix = ".html", ) { auto t = inline_markup_seg(obj, _txt, _suffix); - _txt = to!string(t[0]); + _txt = t[0].to!string; string[] _endnotes = t[1]; string o = para(obj, _txt); auto u = tuple( @@ -929,7 +929,7 @@ auto quote_seg(O)( string _suffix = ".html", ) { auto t = inline_markup_seg(obj, _txt, _suffix); - _txt = to!string(t[0]); + _txt = t[0].to!string; string[] _endnotes = t[1]; string o = quote(obj, _txt); auto u = tuple( @@ -1004,7 +1004,7 @@ auto group_seg(O)( string _suffix = ".html", ) { auto t = inline_markup_seg(obj, _txt, _suffix); - _txt = to!string(t[0]); + _txt = t[0].to!string; string[] _endnotes = t[1]; string o = group(obj, _txt); auto u = tuple( @@ -1075,7 +1075,7 @@ auto block_seg(O)( string _suffix = ".html", ) { auto t = inline_markup_seg(obj, _txt, _suffix); - _txt = to!string(t[0]); + _txt = t[0].to!string; string[] _endnotes = t[1]; string o = block(obj, _txt); auto u = tuple( @@ -1146,7 +1146,7 @@ auto verse_seg(O)( string _suffix = ".html", ) { auto t = inline_markup_seg(obj, _txt, _suffix); - _txt = to!string(t[0]); + _txt = t[0].to!string; string[] _endnotes = t[1]; string o = verse(obj, _txt); auto u = tuple( @@ -1554,13 +1554,13 @@ void seg(D,I)( doc_html[segment_filename] ~= top_level_heading; } auto t = xhtml_format.heading_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: auto t = xhtml_format.heading_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case 8: .. case 9: @@ -1584,7 +1584,7 @@ void seg(D,I)( switch (obj.is_a) { case "toc": auto t = xhtml_format.para_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; break; default: if ((doc_matters.opt.action.debug_do)) { @@ -1606,7 +1606,7 @@ void seg(D,I)( switch (obj.is_a) { case "para": auto t = xhtml_format.para_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; default: @@ -1620,24 +1620,24 @@ void seg(D,I)( switch (obj.is_a) { case "quote": auto t = xhtml_format.quote_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "group": auto t = xhtml_format.group_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "block": auto t = xhtml_format.block_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": auto t = xhtml_format.verse_seg(obj, _txt, suffix); - doc_html[segment_filename] ~= to!string(t[0]); + doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "code": @@ -2266,24 +2266,24 @@ void outputEPub3(D,I)( switch (obj.is_a) { case "quote": auto t = xhtml_format.quote_seg(obj, _txt, suffix); - doc_epub3[segment_filename] ~= to!string(t[0]); + doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": auto t = xhtml_format.group_seg(obj, _txt, suffix); - doc_epub3[segment_filename] ~= to!string(t[0]); + doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": auto t = xhtml_format.block_seg(obj, _txt, suffix); - doc_epub3[segment_filename] ~= to!string(t[0]); + doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": auto t = xhtml_format.verse_seg(obj, _txt, suffix); - doc_epub3[segment_filename] ~= to!string(t[0]); + doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "code": -- cgit v1.2.3