summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2019-09-02 15:42:24 +0000
committerRalph Amissah <ralph@amissah.com>2019-09-02 15:53:28 +0000
commit2949f4d036ea6f3a1a748e843449c8027d2770ee (patch)
tree67dcdf3686d4a25ebca2c2f008a2c9b76a5bc341
parentcode numberlines (numbering) attribute (diff)
downloadsisu-next.zip
sisu-next.tar.xz
reintroduce old markup for code numberingnext
-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..402e326 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. Use: code(numberlines){ ... or: ```code(numberlines) ..."
+ end
@num_id[:code_block] +=1
h={
is_for: :code,