Class: Kramdown::Parser::WebgenKramdown

Inherits:
Kramdown
  • Object
show all
Defined in:
lib/webgen/content_processor/kramdown.rb

Overview

:nodoc:

Constant Summary collapse

{}

Instance Method Summary collapse

Instance Method Details

Caching already normalized link definitions because this is potentially an O(n*m) operation where n…number of link definitions, m…number of invocations.



42
43
44
45
46
# File 'lib/webgen/content_processor/kramdown.rb', line 42

def update_link_definitions(link_defs)
  link_defs.each do |k, v|
    @link_defs[LINK_DEFS_CACHE[k] ||= normalize_link_id(k)] = v
  end
end