Sha256: 1b312706d01ed4169f5db22bf824d1e4087f3ee67c34409e0a711bf075f075e4
Contents?: true
Size: 992 Bytes
Versions: 43
Compression:
Stored size: 992 Bytes
Contents
require 'rabbit/parser/rd/ext/base' require 'rabbit/parser/rd/ext/image' module Rabbit module Parser class RD module Ext class Refer < Base include Image def default_ext_refer(label, source, content, visitor) ref = ReferText.new(content) ref.to = label.element_label ref end # For backward compatibility. # def ext_refer_img(label, content, visitor) # img(label, content, visitor) # end def ext_refer_quote(label, source, content, visitor) return nil unless /^quote:(.*)$/ =~ label.element_label quoted_name = $1 quoted_label = ::RD::Reference::RDLabel.new(quoted_name, label.filename) source = quoted_label.to_s if label.to_s == source default_ext_refer(quoted_label, source, content) end end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems