Skip to content

allow footnotes in received DOC HTML not to be consecutively numbered…#91

Merged
opoudjis merged 1 commit intomainfrom
fix/fn-numbering
Mar 20, 2025
Merged

allow footnotes in received DOC HTML not to be consecutively numbered…#91
opoudjis merged 1 commit intomainfrom
fix/fn-numbering

Conversation

@opoudjis
Copy link
Copy Markdown
Contributor

… in their ids: metanorma/isodoc#623

Metanorma PR checklist

@opoudjis opoudjis self-assigned this Mar 17, 2025
Comment thread lib/html2doc/notes.rb

def transform_footnote_text(note)
note["id"] = ""
#note["id"] = ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

Comment thread lib/html2doc/notes.rb
note.nil? and return false
unless indexes[href]
indexes[href] = @footnote_idx
@footnote_idx += 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation detected.

Comment thread lib/html2doc/notes.rb

set_footnote_link_attrs(elem, idx)
note.nil? and return false
unless indexes[href]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation detected.
Trailing whitespace detected.

Comment thread lib/html2doc/notes.rb
def process_footnote_link(docxml, elem, indexes, footnote)
footnote?(elem) or return false
href = elem["href"].gsub(/^#/, "")
#require "debug"; binding.b
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

Comment thread lib/html2doc/notes.rb
def process_footnote_link(docxml, elem, idx, footnote)
return false unless footnote?(elem)

def process_footnote_link(docxml, elem, indexes, footnote)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment Branch Condition size for process_footnote_link is too high. [<5, 14, 5> 15.68/15]
Method has too many lines. [15/10]

Comment thread lib/html2doc/notes.rb
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

Comment thread lib/html2doc/notes.rb

i += 1
process_footnote_link(docxml, a, indexes, fn) or next
#i += 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

Comment thread lib/html2doc/notes.rb
class Html2Doc
def footnotes(docxml)
i = 1
#i = 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

Comment thread spec/html2doc_spec.rb
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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [115/80]

@opoudjis opoudjis marked this pull request as draft March 18, 2025 00:47
@opoudjis opoudjis marked this pull request as ready for review March 20, 2025 09:47
@opoudjis opoudjis merged commit eb2b754 into main Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant