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

Features/private charset #825

Merged
merged 2 commits into from
Nov 8, 2023
Merged

Features/private charset #825

merged 2 commits into from
Nov 8, 2023

Conversation

opoudjis
Copy link
Contributor

@opoudjis opoudjis commented Nov 8, 2023

Metanorma PR checklist

@opoudjis opoudjis self-assigned this Nov 8, 2023
end.join
end

def inline_anchor_bibref(node)
Copy link

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 inline_anchor_bibref is too high. [<3, 15, 5> 16.09/15]

end.map { |x| x.sub(/%+/, "%") }.join + (node.text || "")
end

def inline_anchor_xref_attrs1(match, target, text)
Copy link

Choose a reason for hiding this comment

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

Cyclomatic complexity for inline_anchor_xref_attrs1 is too high. [8/6]
Perceived complexity for inline_anchor_xref_attrs1 is too high. [8/7]


def concatenate_attributes_to_xref_text(node)
node.attributes.each_with_object([]) do |(k, v), m|
%w(path fragment refid).include?(k) and next
Copy link

Choose a reason for hiding this comment

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

Avoid immutable Array literals in loops. It is better to extract it into a local variable or a constant.

else
xml << node.text
end
end
end.join
end

def hash2styles(role)
CSV.parse_line(role, liberal_parsing: true).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -164,8 +54,8 @@ def latex_parse(text, xml, block)
latex = latex_parse1(text, block) or
return xml.stem type: "MathML", block: block
xml.stem type: "MathML", block: block do |s|
math = Nokogiri::XML.fragment(latex.sub(/<\?[^>]+>/, ""))
.elements[0]
math = Nokogiri::XML.fragment(latex.sub(/<\?[^>]+>/, "")).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -1005,8 +1007,8 @@
</sections>
</standard-document>
OUTPUT
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
.to be_equivalent_to xmlpp(output)
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -988,8 +990,8 @@
</sections>
</standard-document>
OUTPUT
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
.to be_equivalent_to xmlpp(output)
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -969,8 +971,8 @@
</sections>
</standard-document>
OUTPUT
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
.to be_equivalent_to xmlpp(output)
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -953,8 +955,8 @@
</clause></sections>
</standard-document>
OUTPUT
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
.to be_equivalent_to xmlpp(output)
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

@@ -911,8 +913,8 @@
</references></bibliography>
</standard-document>
OUTPUT
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
.to be_equivalent_to xmlpp(output)
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).
Copy link

Choose a reason for hiding this comment

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

Place the . on the next line, together with the method name.

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6e67dc3) 98.03% compared to head (f4edd9d) 98.03%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #825   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files          62       63    +1     
  Lines        5233     5244   +11     
=======================================
+ Hits         5130     5141   +11     
  Misses        103      103           
Files Coverage Δ
lib/metanorma/standoc/anchor.rb 100.00% <100.00%> (ø)
lib/metanorma/standoc/cleanup.rb 97.43% <100.00%> (ø)
lib/metanorma/standoc/cleanup_toc.rb 100.00% <100.00%> (ø)
lib/metanorma/standoc/converter.rb 98.07% <100.00%> (+0.01%) ⬆️
lib/metanorma/standoc/inline.rb 94.84% <100.00%> (-1.87%) ⬇️
lib/metanorma/standoc/utils.rb 98.38% <100.00%> (+0.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@opoudjis opoudjis merged commit 0c38d5a into main Nov 8, 2023
20 checks passed
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