From d43281245f1732941228d79663c8e8d3280a972c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 24 Sep 2019 11:13:42 -0400 Subject: document headers & config: yaml introduced - as toml alternative - both toml & yaml (meta, conf, make) work --- org/default_regex.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'org/default_regex.org') diff --git a/org/default_regex.org b/org/default_regex.org index 575db42..34f6bae 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -56,6 +56,10 @@ static sep = ctRegex!(`␣`, "gm"); static flag_action = ctRegex!(`^(--[a-z][a-z0-9-]+)$`); static flag_action_str = ctRegex!(` (--[a-z][a-z0-9-]+)`); static within_quotes = ctRegex!(`"(.+?)"`, "m"); +static yaml_tag_is_str = ctRegex!(`:str$`); +static yaml_tag_is_int = ctRegex!(`:int$`); +static yaml_tag_is_map = ctRegex!(`:map$`); +static yaml_tag_is_seq = ctRegex!(`:seq$`); static make_heading_delimiter = ctRegex!(`[;][ ]*`); static arr_delimiter = ctRegex!(`[ ]*[;][ ]*`); static name_delimiter = ctRegex!(`^([^,]+)[ ]*,[ ]+(.+?)$`); @@ -109,7 +113,10 @@ static make_simple_substitutions_d = ctRegex!(`(?P\S.+?),\s+(?P.+)`,"i"); -static toml_header_meta_title = ctRegex!(`^\s*(title\s*=\s*"|\[title\])`, "m"); +static toml_header_meta_title = ctRegex!(`^\s*(?:title\s*=\s*"|\[title\])`, "m"); +static yaml_header_meta_title = ctRegex!(`^\s*(?:title\s*:\s*(?:"?\w|$))`, "m"); +static toml_config = ctRegex!(`^\s*(?:[a-z]+\s*=\s*"|\[\w+?\])`, "m"); +static yaml_config = ctRegex!(`^[a-z]+\s*:\s*(?:"?\w|$)`, "m"); #+END_SRC ** heading & paragraph operators :paragraph:operator: -- cgit v1.2.3