lib/asciidoctor/block.rb in asciidoctor-2.0.0.rc.2 vs lib/asciidoctor/block.rb in asciidoctor-2.0.0.rc.3
- old
+ new
@@ -38,22 +38,22 @@
# how the lines should be processed (:simple, :verbatim, :raw, :empty). (default: :simple)
# * :attributes a Hash of attributes (key/value pairs) to assign to this Block. (default: {})
# * :source a String or Array of raw source for this Block. (default: nil)
#
# IMPORTANT: If you don't specify the `:subs` option, you must explicitly call
- # the `lock_in_subs` method to resolve and assign the substitutions to this
+ # the `commit_subs` method to resolve and assign the substitutions to this
# block (which are resolved from the `subs` attribute, if specified, or the
# default substitutions based on this block's context). If you want to use the
# default subs for a block, pass the option `subs: :default`. You can
# override the default subs using the `:default_subs` option.
#--
# QUESTION should we store source_data as lines for blocks that have compound content models?
def initialize parent, context, opts = {}
super
@content_model = opts[:content_model] || DEFAULT_CONTENT_MODEL[context]
if opts.key? :subs
- # FIXME feels funky; we have to be defensive to get lock_in_subs to honor override
+ # FIXME feels funky; we have to be defensive to get commit_subs to honor override
# FIXME does not resolve substitution groups inside Array (e.g., [:normal])
if (subs = opts[:subs])
# e.g., subs: :defult
# subs attribute is honored; falls back to opts[:default_subs], then built-in defaults based on context
if subs == :default
@@ -69,11 +69,11 @@
@default_subs = nil
# interpolation is the fastest way to dup subs as a string
@attributes['subs'] = %(#{subs})
end
# resolve the subs eagerly only if subs option is specified
- # QUESTION should we skip subsequent calls to lock_in_subs?
- lock_in_subs
+ # QUESTION should we skip subsequent calls to commit_subs?
+ commit_subs
# e.g., subs: nil
else
# NOTE @subs is initialized as empty array by super constructor
# prevent subs from being resolved
@default_subs = []