diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v3/html_scroll.rb | 20 | ||||
-rw-r--r-- | lib/sisu/v3/html_segments.rb | 20 |
2 files changed, 26 insertions, 14 deletions
diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb index d58dd502..0a37bcca 100644 --- a/lib/sisu/v3/html_scroll.rb +++ b/lib/sisu/v3/html_scroll.rb @@ -153,16 +153,22 @@ module SiSU_HTML_scroll end elsif dob.is=='para' if dob.indent \ - and dob.indent =~/[1-9]/ + and dob.hang \ + and dob.indent =~/[0-9]/ \ + and dob.hang =~/[0-9]/ if dob.bullet_ - sto.format('li',"i#{dob.indent}") - else sto.format('p',"i#{dob.indent}") - end - else - if dob.bullet_ - sto.format('li','bullet') + if dob.indent =~/[1-9]/ + sto.format('li',"i#{dob.indent}") + else + sto.format('li','bullet') + end + elsif dob.indent == dob.hang + sto.format('p',"i#{dob.indent}") + elsif dob.indent != dob.hang + sto.format('p',"h#{dob.hang}i#{dob.indent}") else sto.para end + else sto.para end elsif dob.is=='block' sto.block diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb index ccd48407..e6dc0d35 100644 --- a/lib/sisu/v3/html_segments.rb +++ b/lib/sisu/v3/html_segments.rb @@ -389,16 +389,22 @@ module SiSU_HTML_seg end elsif dob.is=='para' if dob.indent \ - and dob.indent =~/[1-9]/ + and dob.hang \ + and dob.indent =~/[0-9]/ \ + and dob.hang =~/[0-9]/ if dob.bullet_ - sto.format('li',"i#{dob.indent}") - else sto.format('p',"i#{dob.indent}") - end - else - if dob.bullet_ - sto.format('li','bullet') + if dob.indent =~/[1-9]/ + sto.format('li',"i#{dob.indent}") + else + sto.format('li','bullet') + end + elsif dob.indent == dob.hang + sto.format('p',"i#{dob.indent}") + elsif dob.indent != dob.hang + sto.format('p',"h#{dob.hang}i#{dob.indent}") else sto.para end + else sto.para end end elsif dob.is=='block' |