bikeshed icon indicating copy to clipboard operation
bikeshed copied to clipboard

Bikeshed is adding spaces around ins and del tags which makes things visually weird

Open domenic opened this issue 3 years ago • 2 comments

Input:

<pre class="metadata">
Title: App History API
Shortname: app-history
Repository: WICG/app-history
Inline Github Issues: true
Group: WICG
Status: CG-DRAFT
Level: 1
URL: https://wicg.github.io/app-history/
Boilerplate: omit conformance, omit feedback-header
Editor: Domenic Denicola, Google https://www.google.com/, [email protected], https://domenic.me/
Abstract: The app history API provides a web application-focused way of managing same-origin same-frame history entries and navigations.
!Participate: <a href="https://github.com/WICG/app-history">GitHub WICG/app-history</a> (<a href="https://github.com/WICG/app-history/issues/new">new issue</a>, <a href="https://github.com/WICG/app-history/issues?state=open">open issues</a>)
!Commits: <a href="https://github.com/WICG/app-history/commits/master/spec.bs">GitHub spec.bs commits</a>
Complain About: accidental-2119 yes, missing-example-ids yes
Indent: 2
Default Biblio Status: current
Markup Shorthands: markdown yes
Assume Explicit For: yes
</pre>

<blockquote>
  When the user navigates through a [=browsing context=], e.g. using a browser's back and forward buttons, the user agent must <a spec="HTML">traverse the history by a delta</a> with a delta equivalent to the action specified by the user<del> and</del><ins>,</ins> the browsing context being operated on<ins>, and <i>[=traverse the history by a delta/isUserInitiated=]</i> set to true</ins>.
</blockquote>

Relevant portion of the output:


  <main>
   <blockquote>
     When the user navigates through a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context">browsing context</a>, e.g. using a browser’s back and forward buttons, the user agent must <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/history.html#traverse-the-history-by-a-delta" id="ref-for-traverse-the-history-by-a-delta">traverse the history by a delta</a> with a delta equivalent to the action specified by the user
    <del> and</del>
    <ins>,</ins>
     the browsing context being operated on
    <ins>, and <i><a data-link-type="dfn">isUserInitiated</a></i> set to true</ins>
    . 
   </blockquote>
  </main>

Note the bad spaces it added around the ins and del tags.

domenic avatar Mar 08 '21 21:03 domenic

Possibly coming from https://github.com/html5lib/html5lib-python upstream

nschonni avatar Mar 08 '21 21:03 nschonni

Ran into this again today.

domenic avatar Mar 29 '22 19:03 domenic

No, it's just that right now my serializer categorizes each tag as either block or inline-level, and this affects how it formats. But ins/del are weird tags that can be used both ways, so I probably need to actually special-case them and treat them as block when they contain a block tag and inline otherwise. This'll require some rewriting of how my serializer logic works.

tabatkins avatar Jan 06 '23 00:01 tabatkins