"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/asciidoctor/extensions.rb" between
asciidoctor-2.0.7.tar.gz and asciidoctor-2.0.8.tar.gz

About: Asciidoctor is a text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook, PDF, and other formats.

extensions.rb  (asciidoctor-2.0.7):extensions.rb  (asciidoctor-2.0.8)
skipping to change at line 625 skipping to change at line 625
@@rx_cache = {} @@rx_cache = {}
# Lookup the regexp option, resolving it first if necessary. # Lookup the regexp option, resolving it first if necessary.
# Once this method is called, the regexp is considered frozen. # Once this method is called, the regexp is considered frozen.
def regexp def regexp
@config[:regexp] ||= resolve_regexp @name.to_s, @config[:format] @config[:regexp] ||= resolve_regexp @name.to_s, @config[:format]
end end
def resolve_regexp name, format def resolve_regexp name, format
raise ::ArgumentError, %(invalid name for inline macro: #{name}) unless Ma croNameRx.match? name raise ::ArgumentError, %(invalid name for inline macro: #{name}) unless Ma croNameRx.match? name
@@rx_cache[[name, format]] ||= /\\?#{name}:#{format == :short ? '(){0}' : '(\S+?)'}\[(|.*?[^\\])\]/ @@rx_cache[[name, format]] ||= /\\?#{name}:#{format == :short ? '(){0}' : '(\S+?)'}\[(|#{CC_ANY}*?[^\\])\]/
end end
end end
module InlineMacroProcessorDsl module InlineMacroProcessorDsl
include MacroProcessorDsl include MacroProcessorDsl
def format value def format value
option :format, value option :format, value
end end
alias match_format format alias match_format format
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)