mediacapture-screen-share icon indicating copy to clipboard operation
mediacapture-screen-share copied to clipboard

Inconsistent formatting in doc

Open eladalon1983 opened this issue 2 years ago • 2 comments

The document is very inconsistently formatted. It appears to have been done by hand, or rather, by many different hands.

The README for this repo claims:

To Reflow the Spec

To format the draft use something like tidy --quiet y -utf8 --vertical-space y --tidy-mark n -indent -wrap 80

Presumably "something like" is a key part of that instruction, since the actual command proposed does not work anymore:

$ tidy --quiet y -utf8 --vertical-space y --tidy-mark n -indent -wrap 80 index.html
line 13 column 5 - Error: <section> is not recognized!
line 13 column 5 - Warning: discarding unexpected <section>
line 19 column 5 - Warning: discarding unexpected </section>
line 20 column 5 - Error: <section> is not recognized!
line 20 column 5 - Warning: discarding unexpected <section>
line 25 column 5 - Warning: discarding unexpected </section>
line 26 column 5 - Error: <section> is not recognized!
line 26 column 5 - Warning: discarding unexpected <section>
line 49 column 5 - Warning: discarding unexpected </section>
line 50 column 5 - Error: <section> is not recognized!
line 50 column 5 - Warning: discarding unexpected <section>
line 62 column 5 - Warning: discarding unexpected </section>
line 63 column 5 - Error: <section> is not recognized!
line 63 column 5 - Warning: discarding unexpected <section>
line 77 column 5 - Warning: discarding unexpected </section>
line 78 column 5 - Error: <section> is not recognized!

I think we should have an exact automatic-formatter command and start using it when merging PRs.

eladalon1983 avatar Sep 29 '22 12:09 eladalon1983

this needs https://github.com/htacg/tidy-html5 to work.

we used to take a more systematic approach to line-wrapping and could look at automating it again, but it comes with a non-negligible cost in terms of creating conflict when multiple PRs in parallel touch the same area of the spec.

dontcallmedom avatar Sep 29 '22 13:09 dontcallmedom

but it comes with a non-negligible cost in terms of creating conflict when multiple PRs in parallel touch the same area of the spec

If we format when no large PRs are outstanding, what cost do we expect?

eladalon1983 avatar Oct 17 '22 09:10 eladalon1983

@dontcallmedom, I've noticed this topic is still open and we might be able to close it soon. If we (1) format once now, while there are no large PRs pending, and (2) require future PRs to be pre-formatted, would that not work? Wdys?

eladalon1983 avatar May 02 '23 13:05 eladalon1983

I've re-indented the current spec in #266

dontcallmedom avatar May 03 '23 10:05 dontcallmedom

Seems rectified by #279. That's probably as automated as this is going to get.

(If we do automate it, we might want to discuss that across repos)

jan-ivar avatar Feb 15 '24 00:02 jan-ivar