From 27cce87ed33bd46ef298c848a45651ce782830a3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 21 Aug 2013 23:18:00 -0400 Subject: v5: 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 --- lib/sisu/v5/dal_expand_insertions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v5/dal_expand_insertions.rb') diff --git a/lib/sisu/v5/dal_expand_insertions.rb b/lib/sisu/v5/dal_expand_insertions.rb index ca234624..eb4f8363 100644 --- a/lib/sisu/v5/dal_expand_insertions.rb +++ b/lib/sisu/v5/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\{|```\s+code)/ true - elsif para =~/^\}code/ + elsif para =~/^(?:\}code|```)/m false else codeblock_ end -- cgit v1.2.3