class Asciidoctor::Extensions::InlineMacroProcessor
FIXME for inline passthrough, we need to have some way to specify the text as a passthrough
for example, FormalInlineMacro, ShortInlineMacro (no target) and other patterns
TODO break this out into different pattern types
–
InlineMacroProcessor implementations must extend InlineMacroProcessor.
custom name.
Public: InlineMacroProcessors are used to handle block macros that have a
def initialize name, config = {}
def initialize name, config = {} super @config[:regexp] ||= (resolve_regexp @name, @config[:format]) end
def resolve_regexp name, format
def resolve_regexp name, format # TODO memoize these regular expressions! if format == :short %r(\\?#{name}:\[((?:\\\]|[^\]])*?)\]) else %r(\\?#{name}:(\S+?)\[((?:\\\]|[^\]])*?)\]) end end