aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-07-26 20:27:58 -0400
committerRalph Amissah <ralph@amissah.com>2011-07-26 20:27:58 -0400
commit392f8d5cc7b48dfe27eb1c1034b04e899a54f7bf (patch)
tree02080bd6114078e960c2fef081ba94ea330b3ad8 /lib
parentv3: xhtml, xml sax & dom, indent (partially implemented) ... (diff)
v3: html, indent ...
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/html_scroll.rb20
-rw-r--r--lib/sisu/v3/html_segments.rb20
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'