Skip to content

Commit

Permalink
resolves #74 add basic support for footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Jul 9, 2021
1 parent 41869e6 commit 40e033f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[

== Unreleased

=== Added

* Add basic support for footnotes (#74)

=== Fixed

* Use File.read instead of IO.read to suppress magic subprocess behavior
Expand Down
4 changes: 4 additions & 0 deletions lib/kramdown-asciidoc/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,10 @@ def convert_entity el, opts
opts[:writer].append RESOLVE_ENTITY_TABLE[el.value.code_point] || el.options[:original]
end

def convert_footnote el, opts
opts[:writer].append %(footnote:#{el.options[:name]}[#{(compose_text el.value).gsub ']', '\]'}])
end

def convert_smart_quote el, opts
opts[:writer].append SMART_QUOTE_ENTITY_TO_MARKUP[el.value]
end
Expand Down
2 changes: 2 additions & 0 deletions spec/scenarios/footnote/single.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
By default, `HashMap` uses a hashing function called SipHashfootnote:siphash[https://en.wikipedia.org/wiki/SipHash] that can provide
resistance to Denial of Service (DoS) attacks involving hash tables.
4 changes: 4 additions & 0 deletions spec/scenarios/footnote/single.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
By default, `HashMap` uses a hashing function called SipHash[^siphash] that can provide
resistance to Denial of Service (DoS) attacks involving hash tables.

[^siphash]: [https://en.wikipedia.org/wiki/SipHash](https://en.wikipedia.org/wiki/SipHash)

0 comments on commit 40e033f

Please sign in to comment.