Fix strip_markers step
This commit is contained in:
		@@ -4,16 +4,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
module Skeksis
 | 
					module Skeksis
 | 
				
			||||||
  class IR < Array
 | 
					  class IR < Array
 | 
				
			||||||
    def collapse_verbatim_blocks!
 | 
					 | 
				
			||||||
      last_block = nil
 | 
					 | 
				
			||||||
      self.each do |line|
 | 
					 | 
				
			||||||
        type = get_type(line)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Last thing
 | 
					 | 
				
			||||||
        last_block = type
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def strip_markers!
 | 
					    def strip_markers!
 | 
				
			||||||
      self.map! do |line|
 | 
					      self.map! do |line|
 | 
				
			||||||
        type = line[:type]
 | 
					        type = line[:type]
 | 
				
			||||||
@@ -39,12 +29,15 @@ module Skeksis
 | 
				
			|||||||
          { type: type, link: link, text: text }
 | 
					          { type: type, link: link, text: text }
 | 
				
			||||||
        when :verbatim
 | 
					        when :verbatim
 | 
				
			||||||
          # TODO: Match with syntax highlighting, maybe 
 | 
					          # TODO: Match with syntax highlighting, maybe 
 | 
				
			||||||
          m = /^```(.*)/.match(text)
 | 
					          content.map! do |line|
 | 
				
			||||||
          unless m.nil?
 | 
					            m = /^```(.*)/.match(line)
 | 
				
			||||||
            nil
 | 
					            unless m.nil?
 | 
				
			||||||
          else
 | 
					              nil
 | 
				
			||||||
            { type: type, content: content }
 | 
					            else
 | 
				
			||||||
          end
 | 
					              line
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					          end.compact!
 | 
				
			||||||
 | 
					          { type: type, content: content }
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
          { type: type, content: content }
 | 
					          { type: type, content: content }
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
@@ -151,10 +144,5 @@ module Skeksis
 | 
				
			|||||||
        :text
 | 
					        :text
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					 | 
				
			||||||
    def parse_line(line)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user