summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2019-09-02 15:47:30 +0000
committerRalph Amissah <ralph@amissah.com>2019-09-03 16:28:38 +0000
commit2c80909caf8b6db80d35fcbbdc7936824d76083a (patch)
treeb2cf0d0bc9c73b4c25717bbbc5c37902cbd6dbd6
parentmarkup modification: code blocks attributes, numberlines (diff)
downloadsisu-2c80909caf8b6db80d35fcbbdc7936824d76083a.zip
sisu-2c80909caf8b6db80d35fcbbdc7936824d76083a.tar.xz
re-introduce depreciated markup for numbering codeblocks
-rw-r--r--lib/sisu/ao_doc_str.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sisu/ao_doc_str.rb b/lib/sisu/ao_doc_str.rb
index 1aba9bd..40f5a04 100644
--- a/lib/sisu/ao_doc_str.rb
+++ b/lib/sisu/ao_doc_str.rb
@@ -515,9 +515,12 @@ module SiSU_AO_DocumentStructureExtract
end
@@counter=1
@codeblock_numbered=
- (t_o =~/^(?:code(?:\.[a-z][0-9a-z_]+)?\(.*number(?:lines)?.*?\)\{|```[ ]+code(?:\.[a-z][0-9a-z_]+)?\(.*number(?:lines)?.*?\))/) \
+ (t_o =~/^(?:code(?:\.[a-z][0-9a-z_]+)?\(.*number(?:lines)?.*?\)\{|```[ ]+code(?:\.[a-z][0-9a-z_]+)?\(.*number(?:lines)?.*?\)|code(?:\.[a-z][0-9a-z_]+)?\{#|```[ ]+code(?:\.[a-z][0-9a-z_]+)?\s[#])/) \
? true
: false
+ if (t_o =~/^(?:code(?:\.[a-z][0-9a-z_]+)?\{#|```[ ]+code(?:\.[a-z][0-9a-z_]+)?\s[#])/)
+ puts "WARNING document using depreciated markup for numbering codeblocks\nuse: code(numberlines){ ... or: ```code(numberlines) ..."
+ end
@num_id[:code_block] +=1
h={
is_for: :code,