Skip to content

Commit

Permalink
disable HTML reviewer comments; https://github.com/metanorma/isodoc-s…
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 19, 2019
1 parent 3560330 commit e234cfa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
1 change: 0 additions & 1 deletion lib/isodoc/function/references.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def nonstd_bibitem(list, b, ordinal, bibliography)
end
end


def std_bibitem_entry(list, b, ordinal, biblio)
list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
prefix_bracketed_ref(ref, ordinal) if biblio
Expand Down
6 changes: 6 additions & 0 deletions lib/isodoc/html_function/comments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ def in_comment
end

def comments(div)
=begin
return if @comments.empty?
div.div **{ style: "mso-element:comment-list" } do |div1|
@comments.each { |fn| div1.parent << fn }
end
=end
end

def review_note_parse(node, out)
=begin
fn = @comments.length + 1
make_comment_link(out, fn, node)
@in_comment = true
@comments << make_comment_text(node, fn)
@in_comment = false
=end
end

def comment_link_attrs(fn, node)
Expand Down Expand Up @@ -51,9 +55,11 @@ def make_comment_text(node, fn)
end

def comment_cleanup(docxml)
=begin
move_comment_link_to_from(docxml)
reorder_comments_by_comment_link(docxml)
embed_comment_in_comment_list(docxml)
=end
end

COMMENT_IN_COMMENT_LIST =
Expand Down
27 changes: 7 additions & 20 deletions spec/isodoc/footnotes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
OUTPUT
end

it "processes IsoXML reviewer notes" do
it "processes IsoXML reviewer notes (HTML)" do
FileUtils.rm_f "test.html"
IsoDoc::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
<iso-standard xmlns="http://riboseinc.com/isoxml">
Expand All @@ -115,7 +115,7 @@
INPUT
html = File.read("test.html").sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")
expect(html).to be_equivalent_to <<~"OUTPUT"
<body lang="en" xml:lang="en">
<body lang="en" xml:lang="en">
<div class="title-section">
<p>&#xA0;</p>
</div>
Expand All @@ -128,36 +128,23 @@
<br />
<div>
<h1 class="ForewordTitle">Foreword</h1>
<span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
<a style="mso-comment-reference:SMC_1;mso-comment-date:20170101T0000"><span style="MsoCommentReference" target="3" class="commentLink" from="A" to="C">
<a style="mso-comment-reference:SMC_3;mso-comment-date:20170108T0000"><p id="A">A.</p></a>
</span></a>
</span>
<span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p id="B">B.</p></span></span>
<span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
<a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p id="C">C.</p></span></a>
</span>
<p id="A">A.</p>
<p id="B">B.</p>
<p id="C">C.</p>
</div>
<br />
<div class="Section3" id="">
<h1 class="IntroTitle">Introduction</h1>
</div>
<p class="zzSTDTitle1"></p>
<div style="mso-element:comment-list"></div>
</main>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
asciimath2jax: {
delimiters: [['(#(', ')#)']]
}
asciimath2jax: { delimiters: [['(#(', ')#)']] }
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=AM_HTMLorMML" async="async"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</body>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script></body>
OUTPUT
end

Expand Down

0 comments on commit e234cfa

Please sign in to comment.