aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/po4a_set.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-06-22 01:13:46 -0400
committerRalph Amissah <ralph@amissah.com>2013-06-22 01:13:49 -0400
commitf31e286f4a73c5c0f355512b0cb45c6c82088516 (patch)
treefdf22b179aef9937e7f6a3e71fc6c1e7f0ff9119 /lib/sisu/v5/po4a_set.rb
parentvim, ftplugin sisu.vim, c-\ hard wrap lines to line width (moved from c-j) (diff)
v5: general code cleaningsisu_4.1.5
* propagate back to v4 after testing
Diffstat (limited to 'lib/sisu/v5/po4a_set.rb')
-rw-r--r--lib/sisu/v5/po4a_set.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/sisu/v5/po4a_set.rb b/lib/sisu/v5/po4a_set.rb
index 042bbaa0..44660ef5 100644
--- a/lib/sisu/v5/po4a_set.rb
+++ b/lib/sisu/v5/po4a_set.rb
@@ -180,7 +180,7 @@ WOK
@md,@p=md,para
end
def extract(tag,tag_content,type,attrib)
- dc=if dc_tag \
+ if dc_tag \
and dc_content
[dc_tag,dc_content,{dc_tag=>dc_content}]
else nil
@@ -215,7 +215,7 @@ WOK
self
end
def start_is_match
- meta=case @p
+ case @p
when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/; header($1,@md.title.full,'meta','dc') #dc 1
when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/; header('creator',$2,'meta','dc') #dc 2
when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 3
@@ -266,16 +266,14 @@ WOK
end
end
def dublin
- out=if @p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/
- start_is_match
- else nil
- end
+ (@p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/) \
+ ? start_is_match
+ : nil
end
def meta
- out=if @p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/
- start_is_match
- else nil
- end
+ (@p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/) \
+ ? start_is_match
+ : nil
end
end
class ParagraphNumber