-
-
Notifications
You must be signed in to change notification settings - Fork 389
pluralize
Adds automatic pluralization support for <dfn>
, so that you don't have to manually define data-lt
attributes for plurals.
This is enabled by default for W3C specs.
var respecConfig = {
pluralize: true,
};
You can define a term as <dfn>fetch</dfn>
and reference it as either <a>fetch</a>
or <a>fetches</a>
.
Below are some more examples:
<dfn>user agent</dfn> can be referenced as:
• <a>user agents</a>
• <a>user agent</a>
• <a data-lt="user agent">browser</a>.
<dfn data-lt="pub">bar</dfn> can be referenced as:
• <a>pub</a>
• <a>bar</a>
• <a>bars</a>
• <a data-lt="pub">drinking establishment</a>
• <a data-lt="bar">drinking establishment</a>
• <a data-lt="bars">drinking establishment</a>
Note: We tried to make the pluralization as smart as possible, so that it won't break existing specs easily. It adds plurals only for those terms which are referenced. So in the above example if you don't reference <a>fetches</a>
or <a data-lt="fetches">fetch request</a>
, we won't add a pluralization of fetch
.
If you want to selectively disable pluralization on certain <dfn>
, you can make use of data-lt-no-plural
attribute like:
<dfn data-lt-no-plural>html</dfn>
💖 Support ReSpec by becoming a sponsor via Open Collective. 💖
✨ View rendered version of this documentation at https://respec.org/docs/ ✨
- addSectionLinks
- authors
- caniuse
- edDraftURI
- editors
- favicon
- format (markdown)
- formerEditors
- github
- highlightVars
- isPreview
- license
- lint
- localBiblio
- logos
- maxTocLevel
- mdn
- modificationDate
- noTOC
- otherLinks
- pluralize
- postProcess
- preProcess
- previousDiffURI
- previousMaturity
- previousPublishDate
- prevRecShortname
- prevRecURI
-
processVersion(Deprecated) - publishDate
-
refNote(Deprecated) - shortName
- specStatus
- subjectPrefix
- subtitle
- testSuiteURI
- xref
- additionalCopyrightHolders
-
addPatentNote(Deprecated) - alternateFormats
- canonicalURI
- charterDisclosureURI
- copyrightStart
- crEnd
-
darkMode(deprecated, use dark mode) - doJsonLd
- errata
- group
- implementationReportURI
- lcEnd
- level
- noRecTrack
- prevED
- submissionCommentNumber
-
wg(Deprecated) -
wgId(Deprecated) -
wgPatentPolicy(Deprecated) -
wgPatentURI(Deprecated) - wgPublicList
-
wgURI(Deprecated)
a11y
check-punctuation
local-refs-exist
no-headingless-sections
no-http-props
no-unused-vars
no-unused-dfns
informative-dfn
privsec-section
wpt-tests-exist
Handled by ReSpec for you.
- data-abbr
-
data-cite(Not recommended) - data-dfn-for
- data-dfn-type
- data-format
- data-include-format
- data-include-replace
- data-include
- data-link-for
- data-link-type
- data-local-lt
- data-lt-no-plural
- data-lt-noDefault
- data-lt
- data-number
- data-oninclude
- data-sort
- data-tests
-
data-transform(Deprecated) - data-type
- dir
- lang