Permalink
Browse files

Better API documentation for Kramdown::Parser::Kramdown#update_link_d…

…efintions
  • Loading branch information...
1 parent 9564b3c commit f0953b94f67f919c25e144d7d88f1ea83033d983 @gettalong committed Feb 16, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/kramdown/parser/kramdown.rb
@@ -96,7 +96,13 @@ def parse
protected
#######
- # Update the link definitions with the data from +link_defs+.
+ # :doc:
+ #
+ # Update the parser specific link definitions with the data from +link_defs+ (the value of the
+ # :link_defs option).
+ #
+ # The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and
+ # the values are two element arrays consisting of the link target and a title (can be +nil+).
def update_link_definitions(link_defs)
link_defs.each {|k,v| @link_defs[normalize_link_id(k)] = v}
end

0 comments on commit f0953b9

Please sign in to comment.