aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/dal_doc_str.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-09-05 23:42:16 -0400
committerRalph Amissah <ralph@amissah.com>2013-09-05 23:42:20 -0400
commit55617009d55521dc4c9bf3e998dc8354a74fb8e1 (patch)
tree6f4ab0343b3c50deb21c3630ed1a78039b6c2571 /lib/sisu/v4/dal_doc_str.rb
parentv4: dal, grouped text with fontface spanning newlines, partial solution (diff)
v4 v5: dal, book index markup, round delimiters: allow spaces or space & newline
* allow spaces on both sides of delimiters, or a space before & newline following a delimiter \s+[:|;](\s+|\n) [else parses as before no spaces]
Diffstat (limited to 'lib/sisu/v4/dal_doc_str.rb')
-rw-r--r--lib/sisu/v4/dal_doc_str.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb
index e7d9917b..2a3e6b83 100644
--- a/lib/sisu/v4/dal_doc_str.rb
+++ b/lib/sisu/v4/dal_doc_str.rb
@@ -203,6 +203,9 @@ module SiSU_DAL_DocumentStructureExtract
and @@flag[:table]==:off
unless t_o =~/^(?:@\S+?:|%+)\s/ # extract book index for paragraph if any
idx=if t_o=~/^=\{(.+)\}\s*$\Z/m; m=$1
+ m=m.split(/\n/).join(' ').
+ gsub(/\s+([|:;])\s+/,'\1').
+ gsub(/\s+([+])\s+/,'\1')
t_o=t_o.gsub(/\n=\{.+\}\s*$\Z/m,'')
m
else nil