aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-05-01 10:19:30 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commita89e314ea804defbc798f722b578992e2d8fd131 (patch)
tree45d621d8baacdcb8451c2a2b341c49e3dfb0a06f /src
parentdmd compiles & run fixes (not required by ldc2) (diff)
blurb markup, more like para
Diffstat (limited to 'src')
-rw-r--r--src/sdp/meta/metadoc_from_src.d32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d
index 784991c..9859f7b 100644
--- a/src/sdp/meta/metadoc_from_src.d
+++ b/src/sdp/meta/metadoc_from_src.d
@@ -543,6 +543,35 @@ template SiSUdocAbstraction() {
"base_position" : 0,
];
bullet = false;
+ if (auto m = line.matchFirst(rgx.para_indent)) {
+ debug(paraindent) { // para indent
+ writeln(line);
+ }
+ indent["hang_position"] = (m.captures[1]).to!int;
+ indent["base_position"] = 0;
+ } else if (line.matchFirst(rgx.para_bullet)) {
+ debug(parabullet) { // para bullet
+ writeln(line);
+ }
+ bullet = true;
+ } else if (auto m = line.matchFirst(rgx.para_indent_hang)) {
+ debug(paraindenthang) { // para indent hang
+ writeln(line);
+ }
+ indent=[
+ "hang_position" : (m.captures[1]).to!int,
+ "base_position" : (m.captures[2]).to!int,
+ ];
+ } else if (auto m = line.matchFirst(rgx.para_bullet_indent)) {
+ debug(parabulletindent) { // para bullet indent
+ writeln(line);
+ }
+ indent=[
+ "hang_position" : (m.captures[1]).to!int,
+ "base_position" : 0,
+ ];
+ bullet = true;
+ }
obj_type_status["para"] = State.on;
line_occur["para"] = State.off;
an_object_key="blurb_nugget";
@@ -612,13 +641,14 @@ template SiSUdocAbstraction() {
comp_obj_para.of_section = "blurb";
comp_obj_para.is_of = "para";
comp_obj_para.is_a = "blurb";
- comp_obj_para.text = line.to!string.strip;
+ comp_obj_para.text = munge.url_links(line.to!string.strip).replaceFirst(rgx.para_attribs, "");
comp_obj_para.ocn = 0;
comp_obj_para.obj_cite_number = "";
comp_obj_para.obj_cite_number_off = "";
comp_obj_para.obj_cite_number_type = 0;
comp_obj_para.indent_hang = indent["hang_position"];
comp_obj_para.indent_base = indent["base_position"];
+ comp_obj_para.inline_links = true;
comp_obj_para.bullet = bullet;
the_blurb_section ~= comp_obj_para;
}