aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_read_source_files.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-09-17 16:45:36 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commitaae005b24ce816d89bcda6e72de2cdeadcf7ded0 (patch)
tree22c25de69d355cfd659026bfa3df21f21a196efe /src/sdp/ao_read_source_files.d
parentmake header_make available in creating abstract objects (diff)
heading anchor_tags and cleaning
Diffstat (limited to 'src/sdp/ao_read_source_files.d')
-rw-r--r--src/sdp/ao_read_source_files.d8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sdp/ao_read_source_files.d b/src/sdp/ao_read_source_files.d
index 06c5f41..ce3c7bd 100644
--- a/src/sdp/ao_read_source_files.d
+++ b/src/sdp/ao_read_source_files.d
@@ -75,9 +75,13 @@ template SiSUmarkupRaw() {
return source_txt_str;
}
final private char[][] header0Content1(in string src_text) {
- /+ split string on first match of "^:?A~\s" into [header, content] tuple +/
+ /+ split string on _first_ match of "^:?A~\s" into [header, content] tuple +/
char[][] header_and_content =
- split(cast(char[]) src_text, rgx.heading_a);
+ split(cast(char[]) src_text, rgx.heading_a); // this splits on each occurance of "^:?A~\s" (does not recognize when it appears in a code block)
+ assert(header_and_content.length == 2,
+ "document markup is broken, header body split == " ~ to!string(header_and_content.length) ~
+ "; (header / body array split should == 2 (split is on level A~))"
+ );
return header_and_content;
}
final private char[][] markupSourceLineArray(in char[] src_text) {