Fix strip_markers step

This commit is contained in:
maddiebaka 2023-08-02 11:28:59 -04:00
parent 72e841cfcc
commit 9c99732c24

View File

@ -4,16 +4,6 @@
module Skeksis
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!
self.map! do |line|
type = line[:type]
@ -39,12 +29,15 @@ module Skeksis
{ type: type, link: link, text: text }
when :verbatim
# TODO: Match with syntax highlighting, maybe
m = /^```(.*)/.match(text)
content.map! do |line|
m = /^```(.*)/.match(line)
unless m.nil?
nil
else
{ type: type, content: content }
line
end
end.compact!
{ type: type, content: content }
else
{ type: type, content: content }
end
@ -151,10 +144,5 @@ module Skeksis
:text
end
end
def parse_line(line)
end
end
end