Closed Bug 1134373 Opened 8 years ago Closed 7 years ago

[Compat Data][Importer] Parse KumaScript in Specification comments


( Graveyard :: General, enhancement)

Not set


(Not tracked)



(Reporter: jwhitlock, Assigned: jwhitlock)




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

What problems would this solve?
KumaScript is added verbatim to the Section notes field, without warnings.

Who would use this?
MDN staff during the import process.

What would users see?
MDN staff would be notified of KumaScript that is not understood by the parser. Compat data users would see HTML notes without links to other MDN documents, instead of KumaScript markup.

What would users do? What would happen as a result?
MDN staff would not import data until the KumaScript is removed or the parser grows an understanding of the data.

Is there anything else we should know?
One page with in-comment KumaScript is Web/CSS/vertical-align:
Blocks: 1132269
Severity: normal → enhancement
OS: Other → All
Is un-rendered KumaScript the problem? We can fetch the rendered KumaScript by appending &macros to the endpoint. E.g.,
The parse works with the raw version, because it is easier to extract data from the non-rendered versions of KumaScript, for example, 

{{ SpecName('CSS3 Transitions', '#animatable-css', 'vertical-align') }}


<a class="external" href="" hreflang="en" lang="en">CSS Transitions<br><small lang="en-US">The definition of 'vertical-align' in that specification.</small></a>

Most of these macros are used to add links to other MDN pages, or apply styling.  The parser drops the MDN links, MDN-specific CSS classes, and adds <code> and &lt; &gt; as needed for general-purpose documentation.
Summary: [Compat Data] Parse KumaScript in Specification comments → [Compat Data][Importer] Parse KumaScript in Specification comments
I've submitted PR #33 [1], shipped the updated code to, and re-parsed the MDN pages.

Assignee: nobody → jwhitlock
Ever confirmed: true
Commits pushed to master at
bug 1134373 - Requirements bumps

* django-allauth 0.19.1 -> 0.20.0 - Bump email field size
* django-sortedm2m 0.9.5 -> 0.10.0 - Better customization hooks
* flake8 2.4.0 -> 2.4.1 - pip blacklist
* pylibmc 1.4.2 -> 1.4.3 - Threading fixes
* static3 branch -> 0.6.1 - Explicit UTF-8 reads
* virtualenv 12.1.1 -> 13.0.1 - pip, setuptools upgrades
bug 1134373 - Refactor issue tracking

Store issues in the FeaturePage JSON rather than load when deserializing
the data.  Speeds up page views, importing, and gathering import issues.
bug 1134373 - Switch spec description to tokenizer

Switch the specification description (third column of the table) from a
simple parser to a tokenizer pattern (like compatibility cells) so that
inline KumaScript can be transformed into plain text.
fix bug 1134373 - Handle spec desc. KumaScript

Translate KumaScript found on MDN in specification descriptions to plain
HTML. Warn on use of {{Spec2}}, which is probably a typo for
Merge pull request #33 from jwhitlock/1134373_ks_spec_comments

Fix bug 1134373 - Parse KumaScript in Specification comments
Closed: 7 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.