diff options
Diffstat (limited to 'org/ao_read_source_files.org')
-rw-r--r-- | org/ao_read_source_files.org | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org index c1736cf..233599a 100644 --- a/org/ao_read_source_files.org +++ b/org/ao_read_source_files.org @@ -14,7 +14,6 @@ [[./sdp.org][sdp]] [[./][org/]] * get config file :config: - ** [#A] read config file, source string :string: *** config file (conf.sdl & sisu_document_make) :file:config: @@ -120,7 +119,6 @@ final private auto configSDLang(string conf_sdl) { #+END_SRC * get markup source, read file :source:markup: - ** [#A] read file, source string :string: #+name: ao_markup_source_raw @@ -191,9 +189,13 @@ catch (ErrnoException ex) { #+name: ao_markup_source_raw #+BEGIN_SRC d 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; } #+END_SRC |