diff options
Diffstat (limited to 'lib/sisu/v2/texinfo_format.rb')
-rw-r--r-- | lib/sisu/v2/texinfo_format.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/sisu/v2/texinfo_format.rb b/lib/sisu/v2/texinfo_format.rb index 53918e26..5e1d8af4 100644 --- a/lib/sisu/v2/texinfo_format.rb +++ b/lib/sisu/v2/texinfo_format.rb @@ -175,7 +175,7 @@ WOK end if defined? @md.classify.subject \ and @md.classify.subject=~/\S+/ - subject=spec_char(@md.subject) + subject=spec_char(@md.classify.subject) end if defined? @md.notes.description \ and @md.notes.description=~/\S+/ @@ -240,6 +240,8 @@ WOK end if defined? @md.rights.all \ and @md.rights.all=~/\S+/ + rights=spec_char(@md.rights.all) + end rights=spec_char(@md.rights.all) full_title="Title: #{full_title}\n\n" if full_title #dc author="Author: #{author}\n\n" if author #dc @@ -293,8 +295,8 @@ WOK end def clean(dob) if dob.is=='heading' \ - and dob.obj !~/<#{dob.ocn}>/ - dob.obj="#{dob.obj} <#{dob.ocn}>" + and dob.obj !~/##{dob.ocn}/ + dob.obj="#{dob.obj} ##{dob.ocn}" end dob.obj.gsub!(/<:#>/,'') dob.obj.strip! @@ -382,6 +384,7 @@ WOK txt.gsub!(/\^/,'\\wedge ') txt.gsub!(/(\$)/,"\\$") txt.gsub!(/\~/,'\\~') + txt.gsub!(/#{Mx[:url_o]}(https?:\S+?)#{Mx[:url_c]}/,'<\1>') txt.gsub!(/#{Mx[:url_o]}_(https?:\S+?)#{Mx[:url_c]}/,'\1') txt.gsub!(/§/i,'\S') txt.gsub!(/£/i,'\pounds') @@ -557,8 +560,8 @@ WOK end def clean(dob,txt) if dob.is=='heading' \ - and txt !~/<#{dob.ocn}>/ - txt="#{dob.obj} <#{dob.ocn}>" + and txt !~/##{dob.ocn}/ + txt="#{dob.obj} ##{dob.ocn}" end txt.gsub!(/<:#>/,'') txt.strip! |