diff options
Diffstat (limited to 'lib/sisu/develop/ao_doc_str.rb')
-rw-r--r-- | lib/sisu/develop/ao_doc_str.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sisu/develop/ao_doc_str.rb b/lib/sisu/develop/ao_doc_str.rb index 7f054660..c5f39ed4 100644 --- a/lib/sisu/develop/ao_doc_str.rb +++ b/lib/sisu/develop/ao_doc_str.rb @@ -1138,8 +1138,8 @@ module SiSU_AO_DocumentStructureExtract SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h) end def build_lines(type=:none) - lines,lines_new=@data,[] - lines.each do |line| + lines=@data + lines.each.map do |line| line=if line =~/\S/ \ and line !~/^(?:code(?:\.[a-z][0-9a-z_]+)?\{|\}code)/ \ and line !~/^(?:```[ ]+code(?:\.[a-z][0-9a-z_]+)?|```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$)/ \ @@ -1156,9 +1156,8 @@ module SiSU_AO_DocumentStructureExtract line.gsub(/\s*$/,"#{Mx[:br_nl]}") else line end - lines_new << line + line end - lines_new end end class Structure # this must happen early |