From aae005b24ce816d89bcda6e72de2cdeadcf7ded0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 17 Sep 2016 16:45:36 -0400 Subject: heading anchor_tags and cleaning --- org/ao_read_source_files.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'org/ao_read_source_files.org') 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 -- cgit v1.2.3