hiki2latex 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Rakefile +6 -1
 - data/lib/hiki2latex/hiki2latex.rb +7 -10
 - data/lib/hiki2latex/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 77273e59f02b7dc973556624467a04bd23b3da59
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8a229397865003d62a2680210e98b1d8dd56e87c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9d4cd338bafb61dfdcf3cc24183e376de9e2f31757af35e2c4d87b19acb755abdf4dfe5db1736295a57231ba8e861ea29e684ec995b3e4a265737cbd10ded545
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: cda1015746a1a8ebdceb148df591508044bbbb784a042da17c2df564d9d3895412dad037f9282fc9d25e0253c22d30fc30ee7d42dd8e8b1472d47c782bc07584
         
     | 
    
        data/Rakefile
    CHANGED
    
    
| 
         @@ -136,16 +136,9 @@ class LatexOutput 
     | 
|
| 
       136 
136 
     | 
    
         | 
| 
       137 
137 
     | 
    
         
             
              def escape_snake_names(str)
         
     | 
| 
       138 
138 
     | 
    
         
             
                str.gsub!(/_/,"\\_")
         
     | 
| 
       139 
     | 
    
         
            -
                patterns = [/\$(.+?)\$/ ,  
     | 
| 
      
 139 
     | 
    
         
            +
                patterns = [/\$(.+?)\$/ , /\\verb\|(.+?)\|/, /equation(.+?)equation/m ]
         
     | 
| 
       140 
140 
     | 
    
         
             
                patterns.each{|pattern|
         
     | 
| 
       141 
     | 
    
         
            -
                  str.gsub!(pattern) 
     | 
| 
       142 
     | 
    
         
            -
            #      p text
         
     | 
| 
       143 
     | 
    
         
            -
                  if text =~ /\\_/ then
         
     | 
| 
       144 
     | 
    
         
            -
                    text.gsub!(/\\_/,"_")
         
     | 
| 
       145 
     | 
    
         
            -
                  else
         
     | 
| 
       146 
     | 
    
         
            -
                    text
         
     | 
| 
       147 
     | 
    
         
            -
                  end
         
     | 
| 
       148 
     | 
    
         
            -
                  }
         
     | 
| 
      
 141 
     | 
    
         
            +
                  str.gsub!(/\\_/,"_")    if str.match(pattern)
         
     | 
| 
       149 
142 
     | 
    
         
             
                }
         
     | 
| 
       150 
143 
     | 
    
         
             
                str
         
     | 
| 
       151 
144 
     | 
    
         
             
              end
         
     | 
| 
         @@ -337,7 +330,11 @@ class LatexOutput 
     | 
|
| 
       337 
330 
     | 
    
         | 
| 
       338 
331 
     | 
    
         | 
| 
       339 
332 
     | 
    
         
             
              def hyperlink(uri, title)
         
     | 
| 
       340 
     | 
    
         
            -
                 
     | 
| 
      
 333 
     | 
    
         
            +
                if uri==title then
         
     | 
| 
      
 334 
     | 
    
         
            +
                  %Q(\\verb\|#{uri}\|)
         
     | 
| 
      
 335 
     | 
    
         
            +
                else
         
     | 
| 
      
 336 
     | 
    
         
            +
                  %Q(\\verb\|#{title}(#{uri})\|)
         
     | 
| 
      
 337 
     | 
    
         
            +
                end
         
     | 
| 
       341 
338 
     | 
    
         
             
              end
         
     | 
| 
       342 
339 
     | 
    
         | 
| 
       343 
340 
     | 
    
         
             
            end
         
     | 
    
        data/lib/hiki2latex/version.rb
    CHANGED