diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-15 02:10:40 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-15 02:10:40 +0100 |
commit | 88dbbab55d82cf27de3bc9b3d5f2ad0ad48e36c8 (patch) | |
tree | eca66481b24900589602feb2c9c4fe7182951728 /lib/sisu/v0/plaintext.rb | |
parent | Updated sisu-0.61.0 (diff) | |
parent | composite master renaming, and; multiple remote puts (rsync|scp) (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/plaintext.rb')
-rw-r--r-- | lib/sisu/v0/plaintext.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb index 361624e1..86a17089 100644 --- a/lib/sisu/v0/plaintext.rb +++ b/lib/sisu/v0/plaintext.rb @@ -70,7 +70,7 @@ module SiSU_Plaintext class Source def initialize(opt) @opt=opt - @@dostype=if @opt.fns =~/(.+?)\.[_-]?sst$/ + @@dostype=if @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/ if @opt.mod.inspect =~ /--footnote/ and @opt.mod.inspect =~ /--dos/; 'msdos footnotes' elsif @opt.mod.inspect =~ /--endnote/ and @opt.mod.inspect =~ /--dos/; 'msdos endnotes' elsif @opt.mod.inspect =~ /--footnote/; 'unix footnotes' @@ -336,7 +336,8 @@ WOK end if para =~/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/ if para =~/<:code>/ #code-block: angle brackets special characters - para.gsub!(/(?=^|[^}])_</m,'<'); para.gsub!(/(?=^|[^}])_>/m,'>') + para.gsub!(/(^|[^}])_([<>])/m,'\1\2') # _> _< + para.gsub!(/(^|[^}])_([<>])/m,'\1\2') # _<_< end para.gsub!(/<br(?: \/)?>/,"\n") # watch para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/,'') |