-
Notifications
You must be signed in to change notification settings - Fork 4
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
xref of bookmarks: https://github.com/metanorma/metanorma-bipm/issues/67 #236
Conversation
</annex> | ||
</iso-standard> | ||
OUTPUT | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end at 2693, 0 is not aligned with it "cross-references bookmarks" do at 2550, 2.
</clause> | ||
</annex> | ||
</iso-standard> | ||
OUTPUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OUTPUT is not aligned with expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<"INPUT", true))).to be_equivalent_to xmlpp(<<"OUTPUT") or beginning of method definition.
</annex> | ||
</iso-standard> | ||
INPUT | ||
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 2 spaces for indentation in a heredoc.
@@ -2547,6 +2547,151 @@ | |||
OUTPUT | |||
end | |||
|
|||
it "cross-references bookmarks" do | |||
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") | |||
<iso-standard xmlns="http://riboseinc.com/isoxml"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 2 spaces for indentation in a heredoc.
@@ -2547,6 +2547,151 @@ | |||
OUTPUT | |||
end | |||
|
|||
it "cross-references bookmarks" do | |||
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 2 (not 4) spaces for indentation.
Line is too long. [130/120]
next if n["id"].nil? || n["id"].empty? | ||
@anchors[n["id"]] = { | ||
type: "bookmark", label: nil, value: nil, | ||
xref: @anchors[s["id"]][:xref] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing hash brace must be on the line after the last hash element when opening brace is on a separate line from the first hash element.
notes = s.xpath(ns(".//bookmark")) - s.xpath(ns(".//clause//bookmark")) - | ||
s.xpath(ns(".//appendix//bookmark")) | ||
notes.each do |n| | ||
next if n["id"].nil? || n["id"].empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty line after guard clause.
Use n["id"].blank? instead of n["id"].nil? || n["id"].empty?.
@@ -136,5 +136,19 @@ def list_item_anchor_names(list, list_anchor, depth, prev_label, refer_list) | |||
end | |||
end | |||
end | |||
|
|||
def bookmark_anchor_names(sections) |
There was a problem hiding this comment.
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 bookmark_anchor_names is too high. [21.19/15]
Method has too many lines. [11/10]
No description provided.