From 9ccfd45405e11016bb28fc6d8ff290dff8f5c83d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 25 Aug 2013 01:20:49 -0400 Subject: v4: merge v5, syntax additions, block text related (version bump to 4.2.*) * syntax add * switch ocn off and on for a block of content, line containing only off: "--~#" (omit headings where possible) "---#" on: "--+#" * alternative open and close for blocks using line starting with "```", e.g. open code block: "``` code"; close code block: "```" start poem: "``` poem"; end poem: "```" * remove need for an empty line between opening & closing of a text block [ note further refinements will be required; use of tildes "~~" considered but more problematic, tics not used elsewhere] --- lib/sisu/v4/dal_expand_insertions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v4/dal_expand_insertions.rb') diff --git a/lib/sisu/v4/dal_expand_insertions.rb b/lib/sisu/v4/dal_expand_insertions.rb index 52deed0a..be258417 100644 --- a/lib/sisu/v4/dal_expand_insertions.rb +++ b/lib/sisu/v4/dal_expand_insertions.rb @@ -332,9 +332,9 @@ module SiSU_DAL_Insertions tuned_file,tuned_file_tmp=[],[] codeblock_=false data.each do |para| - codeblock_=if para =~/^code\{/ + codeblock_=if para =~/^(?:code\{|[`]{3}\s+code)/ true - elsif para =~/^\}code/ + elsif para =~/^(?:\}code|[`]{3}(?:\s|$))/m false else codeblock_ end -- cgit v1.2.3