Skip to content

Format rest of specs #686

Description

@MichaelKohler

In cbb2bee I added a format command for the Web Monetization spec. This does not yet include the Extension API spec, or the Flows spec.

These specs use includes, which are a bit tricky with tidy-html. In the end we want all index.html and includes to be formatted accordingly. The only way to somewhat format the includes was to add the following tidyconfig options:

omit-optional-tags: yes
doctype: omit

With this, it does not add a full HTML skeleton to the includes, however, that has issues that will need to be solved:

  • We need to decide if omitting optional end tags is something we are okay with (we for example use quite a lot of p tags)
  • tidyhtml adds an empty <title> to each include, which we don't want
  • There is a bug in the media-example.html include if we apply formatting. For audio and video tags the link tag is a child node. For picture it gets moved out.
<picture srcset="cat.jpeg" onmonetization="sayThanks(this)"></picture>
<link rel="monetization" href="https://example.com/images/pay">

--

WIP branch: https://github.com/MichaelKohler/webmonetization/tree/wip-format-specs

Metadata

Metadata

Assignees

No one assigned

    Labels

    specificationWork required on specification

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions