Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves #74 add basic support for footnotes #91

Merged
merged 1 commit into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[

* Add support for converting block LaTeX math to stem block
* Add support for converting span LaTeX math to inline stem macro
* Add basic support for footnotes (#74)

=== Fixed

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)