Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "definedIn" property to dfns extract #446

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Add "definedIn" property to dfns extract #446

merged 1 commit into from
Nov 16, 2020

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Nov 14, 2020

The definedIn property captures the context under which the definition appears in the specification. Value may be one of:

  • "dt": appears in a <dt>
  • "pre": appears in a <pre>
  • "table": appears in a <table>
  • "heading": appears in one of <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
  • "note": appears in a section flagged with a note class
  • "example": appears in a section flagged with an example class
  • "prose": appears elsewhere, typically in a paragraph.

This information is meant to be used for analysis purpose, e.g. to identify cases where a definition used by a spec is incorrectly defined in a Note, or where an IDL definition appears in an IDL block instead of in the prose of the specification.

Other projects may also perhaps use that information, likely in combination with type, to assess whether they should link to the definition itself or to the section that contains the definition. See related discussion in mdn/browser-compat-data#6765 (comment)

The classification may evolve based on feedback.

The `definedIn` property captures the context under which the definition appears
in the specification. Value may be one of:
- "dt": appears in a <dt>
- "pre": appears in a <pre>
- "table": appears in a <table>
- "heading": appears in one of <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
- "note": appears in a section flagged with a `note` class
- "example": appears in a section flagged with an `example` class
- "prose": appears elsewhere, typically in a paragraph.

This information is meant to be used for analysis purpose, e.g. to identify
cases where a definition used by a spec is incorrectly defined in a Note, or
where an IDL definition appears in an IDL block instead of in the prose of the
specification.

Other projects may also perhaps use that information, likely in combination with
`type`, to assess whether they should link to the definition itself or to the
section that contains the definition.

The classification may evolve based on feedback.
@tidoust tidoust merged commit 04a4a7f into master Nov 16, 2020
@tidoust tidoust deleted the dfns-definedIn branch July 9, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants