[Compat Data][Importer] - Fix parsing of multiple KumaScript in footnotes

RESOLVED FIXED

Status

Mozilla Developer Network
General
--
minor
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jwhitlock, Assigned: jwhitlock)

Tracking

Details

(Whiteboard: [specification][type:feature])

(Assignee)

Description

3 years ago
What problems would this solve?
===============================
Some pages, like https://developer.mozilla.org/en-US/docs/Web/CSS/element, include multiple KumaScript macros in a single footnote.  The currently KS processing incorrectly replaces the second instance

Who would use this?
===================
MDN team importing data

What would users see?
=====================
The footnote would be correctly converted

What would users do? What would happen as a result?
===================================================
They would be able to correctly import the page.

Is there anything else we should know?
======================================
KumaScript handling in footnotes is a hack.  Footnotes need to be parsed like compatibility cells instead.  Similar code is needed for bug 1134373.
(Assignee)

Updated

3 years ago
Blocks: 1132269
Severity: normal → minor
OS: Other → All
(Assignee)

Updated

3 years ago
Assignee: nobody → jwhitlock
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Comment 2

3 years ago
Commits pushed to master at https://github.com/mozilla/web-platform-compat

https://github.com/mozilla/web-platform-compat/commit/10df0918e40e318889433c2e7a8f9022ce3fdc5e
bug 1139619 - Rearrange grammar to reuse elements

Rearrange the parsing grammar so that generic elements such as <p>,
</p>, and <br> are no longer tied to cell parsing but can be reused in
footnote parsing.

https://github.com/mozilla/web-platform-compat/commit/b167bfa2259cf0bac1b4edd9c4afcb6998fbd189
bug 1139619 - Convert footnote to tokenizer

Tokenize the footnote section, in a similar way to the specification
description and compatibility cells.

https://github.com/mozilla/web-platform-compat/commit/6003f86dc966231478eb76184183e2b3deebff7e
bug 1139619 - Better issue context

Change line numbers from 0-index to 1-index.  If the issue context
includes the last lines of the file (which may not be terminated with a
line feed), include in context.

https://github.com/mozilla/web-platform-compat/commit/79b64da188918dea208171dc6387694cf4094cc0
bug 1139619 - Discard empty footnote paragraphs

Don't add footnote_no_id issue for empty or whitespace-only footnote
paragraphs.  If a multi-line footnote includes an empty paragraph,
drop it.

https://github.com/mozilla/web-platform-compat/commit/0799fe717bd3d35fb80bc5c086bfe5d851bfcc69
bug 1139619 - Warn on <pre> attributes

When a <pre> tag in the footnotes includes attributes, warn the user
that they won't be in output.  Previously, class="brush:css" was special
cased, but trying to default to no attributes since we'll have to reject
unexpected markup eventually.

https://github.com/mozilla/web-platform-compat/commit/3ada522d79a67228689f95eea20edde119c96a14
bug 1139619 - Handle <code> blocks in footnote

Also adjust code block handling so that generics like
_consume_attributes can be used to parse it.

https://github.com/mozilla/web-platform-compat/commit/7f2c8b314fc2faca5ba727d321374a22cd78d690
bug 1139619 - Refactor common HTML parsing

Standardize parsing of common HTML elements with optional attributes

https://github.com/mozilla/web-platform-compat/commit/1425860193741dabae48b4bb66fb3647bd94f19e
bug 1139619 - Rename kumascript_to_html

Rename kumascript_to_text to kumascript_to_html, to reflect that it
outputs HTML instead of plain text.

https://github.com/mozilla/web-platform-compat/commit/3193fba84b45e46b9a5a7c789b313e3755a1cefa
bug 1139619 - Gracefully handle unknown issue slug

Previously, unknown issue slugs would result in KeyError exceptions.
Now, a generic message is printed, allowing for easier debugging and
fixing.

https://github.com/mozilla/web-platform-compat/commit/4beb7586d60832c464bec43ee07e164bb014ce94
fix bug 1139619 - Parse HTML as nested HTML tags

Instead of tokenizing HTML content as a sequence of tags, parse into a
tree of nested content.  This allows more nuanced handling of HTML, such
as removing tags (<p> and <a> in feature names, <span> everywhere), and
more detailed messages.

https://github.com/mozilla/web-platform-compat/commit/8f7e805369fd56cab4cc267fd1abbcd02bb38faa
Merge pull request #34 from jwhitlock/1139619_parse_footnotes

Fix bug 1139619 and fix bug 1134450 - Better parsing of footnotes

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.