allow footnotes in received DOC HTML not to be consecutively numbered…#91
Merged
allow footnotes in received DOC HTML not to be consecutively numbered…#91
Conversation
|
|
||
| def transform_footnote_text(note) | ||
| note["id"] = "" | ||
| #note["id"] = "" |
| note.nil? and return false | ||
| unless indexes[href] | ||
| indexes[href] = @footnote_idx | ||
| @footnote_idx += 1 |
|
|
||
| set_footnote_link_attrs(elem, idx) | ||
| note.nil? and return false | ||
| unless indexes[href] |
There was a problem hiding this comment.
Inconsistent indentation detected.
Trailing whitespace detected.
| def process_footnote_link(docxml, elem, indexes, footnote) | ||
| footnote?(elem) or return false | ||
| href = elem["href"].gsub(/^#/, "") | ||
| #require "debug"; binding.b |
| def process_footnote_link(docxml, elem, idx, footnote) | ||
| return false unless footnote?(elem) | ||
|
|
||
| def process_footnote_link(docxml, elem, indexes, footnote) |
There was a problem hiding this comment.
Assignment Branch Condition size for process_footnote_link is too high. [<5, 14, 5> 15.68/15]
Method has too many lines. [15/10]
| footnotes.each_with_index do |f, i| | ||
| fn = list.first.add_child(footnote_container(docxml, i + 1)) | ||
| footnotes.each do |f| | ||
| #require 'debug'; binding.b |
|
|
||
| i += 1 | ||
| process_footnote_link(docxml, a, indexes, fn) or next | ||
| #i += 1 |
| class Html2Doc | ||
| def footnotes(docxml) | ||
| i = 1 | ||
| #i = 1 |
| document<a epub:type="footnote" href="#a1">1</a> allegedly<a epub:type="footnote" href="#a2">2</a></div> | ||
| <aside id="a1">Footnote</aside> | ||
| <aside id="a2">Other Footnote</aside>' | ||
| document<a epub:type="footnote" href="#a_632">1</a> allegedly<a epub:type="footnote" href="#a_782">2</a></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… in their ids: metanorma/isodoc#623
Metanorma PR checklist