martile 0.3.1 → 0.3.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/martile.rb +18 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4ea535043c10fa85c20eed238d483035fbc35b39
         | 
| 4 | 
            +
              data.tar.gz: 17c2651a1e5df6fd77ef0b17292c16d2a30e327b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ca341dd25ca9dd6066ec3532c711541af3cb8e824f12fdad593b3e3f7dfb4552c76af0a14dc47c61e3dd3d11ba25e0a7ba8c0280e969fe6d7b829e0b1be2efae
         | 
| 7 | 
            +
              data.tar.gz: dc1a492db56e591a4f9f18389e3d2ab37594db047af1dc22326003242ba0c516bf39218a7dd803789950fe4c3d35a3367bd5714e83ba8ca0f188046bbec7818a
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/lib/martile.rb
    CHANGED
    
    | @@ -8,7 +8,13 @@ require 'dynarex' | |
| 8 8 | 
             
            require 'rdiscount'
         | 
| 9 9 |  | 
| 10 10 |  | 
| 11 | 
            -
            # feature:  27-Sep-2014: A smartlink can now be used  | 
| 11 | 
            +
            # feature:  27-Sep-2014: 1. A smartlink can now be used 
         | 
| 12 | 
            +
            #                                               e.g. ?link http://someurl?
         | 
| 13 | 
            +
            #                        2. pre tegs can now be created from 2 pairs of slash 
         | 
| 14 | 
            +
            #                           tags, before and after the pre tag content e.g.
         | 
| 15 | 
            +
            #                            //
         | 
| 16 | 
            +
            #                            testing
         | 
| 17 | 
            +
            #                            //
         | 
| 12 18 | 
             
            # feature:  24-Sep-2014: A kind of markdown list can now be created inside 
         | 
| 13 19 | 
             
            #                        of <ol> or <ul> tags
         | 
| 14 20 | 
             
            # bug fix:  16-Apr-2014: Words containing an underscore should no longer be 
         | 
| @@ -40,7 +46,9 @@ class Martile | |
| 40 46 |  | 
| 41 47 | 
             
              attr_reader :to_html
         | 
| 42 48 |  | 
| 43 | 
            -
              def initialize( | 
| 49 | 
            +
              def initialize(raw_s)
         | 
| 50 | 
            +
                
         | 
| 51 | 
            +
                s = slashpre raw_s
         | 
| 44 52 |  | 
| 45 53 | 
             
                raw_s2 = apply_filter(s.strip) {|x| code_block_to_html x }
         | 
| 46 54 |  | 
| @@ -240,4 +248,12 @@ class Martile | |
| 240 248 | 
             
                s.gsub(/\B\?([^\n]+) +(https?:\/\/[^\b]+)\?\B/,'[\1](\2)')
         | 
| 241 249 | 
             
              end
         | 
| 242 250 |  | 
| 251 | 
            +
              def slashpre(s
         | 
| 252 | 
            +
                           )
         | 
| 253 | 
            +
                s.gsub(/\B\/\/([^\/]+)\B\/\//) do |x|
         | 
| 254 | 
            +
                  "<pre>#{($1).lines.map{|y| y.sub(/^ +/,'')}.join}</pre>"
         | 
| 255 | 
            +
                end
         | 
| 256 | 
            +
                
         | 
| 257 | 
            +
              end
         | 
| 258 | 
            +
              
         | 
| 243 259 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |