Closed Bug 1139619 Opened 7 years ago Closed 7 years ago

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


( Graveyard :: General, defect)

Not set


(Not tracked)



(Reporter: jwhitlock, Assigned: jwhitlock)



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

What problems would this solve?
Some pages, like, 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.
Blocks: 1132269
Severity: normal → minor
OS: Other → All
Assignee: nobody → jwhitlock
Ever confirmed: true
Commits pushed to master at
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.
bug 1139619 - Convert footnote to tokenizer

Tokenize the footnote section, in a similar way to the specification
description and compatibility cells.
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.
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.
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.
bug 1139619 - Handle <code> blocks in footnote

Also adjust code block handling so that generics like
_consume_attributes can be used to parse it.
bug 1139619 - Refactor common HTML parsing

Standardize parsing of common HTML elements with optional attributes
bug 1139619 - Rename kumascript_to_html

Rename kumascript_to_text to kumascript_to_html, to reflect that it
outputs HTML instead of plain text.
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
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.
Merge pull request #34 from jwhitlock/1139619_parse_footnotes

Fix bug 1139619 and fix bug 1134450 - Better parsing of footnotes
Closed: 7 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.