[Git][reproducible-builds/diffoscope][master] Revert "Correction to HTML markup warnings/errors: fix empty value for...

Chris Lamb gitlab at salsa.debian.org
Sat Mar 16 03:37:12 CET 2019


Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
ff28b6eb by Chris Lamb at 2019-03-16T02:36:30Z
Revert "Correction to HTML markup warnings/errors: fix empty value for attributte name on 'a' tags and add an id to the nearest div containers."

This reverts commit a6fd6b33e0b2018862e6ae8bfd12884aa96e8eb9; not sure how this
ended up on master (?) given it's on an MR..?

Gbp-Dch: ignore

- - - - -


1 changed file:

- diffoscope/presenters/html/html.py


Changes:

=====================================
diffoscope/presenters/html/html.py
=====================================
@@ -157,14 +157,11 @@ def output_visual(visual, path, indentstr, indentnum):
     logger.debug('including image for %s', visual.source)
     indent = tuple(indentstr * (indentnum + x) for x in range(3))
     anchor = output_anchor(path)
-    id = ""
-    if anchor:
-        id = u"""id=\"{0}\"""".format(anchor)
     return u"""{0[0]}<div class="difference">
 {0[1]}<div class="diffheader">
 {0[1]}<div class="diffcontrol">⊟</div>
-{0[1]}<div {5}><span class="source">{1}</span>
-{0[2]}<a class="anchor" href="#{2}">\xb6</a>
+{0[1]}<div><span class="source">{1}</span>
+{0[2]}<a class="anchor" href="#{2}" name="{2}">\xb6</a>
 {0[1]}</div>
 {0[1]}</div>
 {0[1]}<div class="difference"><img src=\"data:{3},{4}\" alt=\"compared images\" /></div>
@@ -174,16 +171,12 @@ def output_visual(visual, path, indentstr, indentnum):
         anchor,
         visual.data_type,
         visual.content,
-        id,
     )
 
 
 def output_node_frame(difference, path, indentstr, indentnum, body):
     indent = tuple(indentstr * (indentnum + x) for x in range(3))
     anchor = output_anchor(path)
-    id = ""
-    if anchor:
-        id = u"""id=\"{0}\"""".format(anchor)
     dctrl_class, dctrl = (
         ("diffcontrol", u'⊟')
         if difference.has_visible_children()
@@ -192,8 +185,8 @@ def output_node_frame(difference, path, indentstr, indentnum, body):
     if difference.source1 == difference.source2:
         header = u"""{0[1]}<div class="{1}">{2}</div>
 {0[1]}<div><span class="diffsize">{3}</span></div>
-{0[1]}<div {6}><span class="source">{5}</span>
-{0[2]}<a class="anchor" href="#{4}">\xb6</a>
+{0[1]}<div><span class="source">{5}</span>
+{0[2]}<a class="anchor" href="#{4}" name="{4}">\xb6</a>
 {0[1]}</div>
 """.format(
             indent,
@@ -202,14 +195,13 @@ def output_node_frame(difference, path, indentstr, indentnum, body):
             sizeof_fmt(difference.size()),
             anchor,
             html.escape(difference.source1),
-            id,
         )
     else:
         header = u"""{0[1]}<div class="{1} diffcontrol-double">{2}</div>
 {0[1]}<div><span class="diffsize">{3}</span></div>
 {0[1]}<div><span class="source">{5}</span> vs.</div>
-{0[1]}<div {7}><span class="source">{6}</span>
-{0[2]}<a class="anchor" href="#{4}">\xb6</a>
+{0[1]}<div><span class="source">{6}</span>
+{0[2]}<a class="anchor" href="#{4}" name="{4}">\xb6</a>
 {0[1]}</div>
 """.format(
             indent,
@@ -219,7 +211,6 @@ def output_node_frame(difference, path, indentstr, indentnum, body):
             anchor,
             html.escape(difference.source1),
             html.escape(difference.source2),
-            id,
         )
 
     return PartialString.numl(



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/ff28b6ebd4e808705808945e722da03388ef53a3

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/ff28b6ebd4e808705808945e722da03388ef53a3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190316/1a060490/attachment.html>


More information about the rb-commits mailing list