aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/source/read_source_files.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/source/read_source_files.d')
-rw-r--r--src/doc_reform/source/read_source_files.d20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/doc_reform/source/read_source_files.d b/src/doc_reform/source/read_source_files.d
index b19582d..753612e 100644
--- a/src/doc_reform/source/read_source_files.d
+++ b/src/doc_reform/source/read_source_files.d
@@ -59,13 +59,20 @@ static template DocReformRawMarkupContent() {
static assert(!isTypeTuple!(tu));
images_list = tu[2].dup;
}
+ string header_type = "";
+ if (header_raw.match(rgx.yaml_config)) {
+ header_type = "yaml";
+ } else if (header_raw.match(rgx.toml_config)) {
+ header_type = "toml";
+ }
t = tuple(
header_raw,
sourcefile_body_content,
+ header_type,
insert_file_list,
images_list
);
- static assert(t.length==4);
+ static assert(t.length==5);
return t;
}
}
@@ -125,13 +132,20 @@ static template DocReformRawMarkupContent() {
auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) {
string[] file_insert_list = [];
string[] images_list = [];
- auto hc = header0Content1(source_txt_str);
- auto header = hc[0];
+ char[][] hc = header0Content1(source_txt_str);
+ char[] header = hc[0];
char[] source_txt = hc[1];
auto source_line_arr = markupSourceLineArray(source_txt);
+ string header_type = "";
+ if (header.match(rgx.yaml_config)) {
+ header_type = "yaml";
+ } else if (header.match(rgx.toml_config)) {
+ header_type = "toml";
+ }
auto t = tuple(
header,
source_line_arr,
+ header_type,
file_insert_list,
images_list
);