Class: Kramdown::Parser::WebgenKramdown
- Inherits:
-
Kramdown
- Object
- Kramdown
- Kramdown::Parser::WebgenKramdown
- Defined in:
- lib/webgen/content_processor/kramdown.rb
Overview
:nodoc:
Constant Summary collapse
- LINK_DEFS_CACHE =
{}
Instance Method Summary collapse
-
#update_link_definitions(link_defs) ⇒ Object
Caching already normalized link definitions because this is potentially an O(n*m) operation where n…number of link definitions, m…number of invocations.
Instance Method Details
#update_link_definitions(link_defs) ⇒ Object
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 |