-
-
Notifications
You must be signed in to change notification settings - Fork 393
pluralize
Sid Vishnoi edited this page May 29, 2018
·
11 revisions
Adds automatic pluralization support for <dfn>
, so that you don't have to manually define data-lt
attributes for plurals.
// enable automatic pluralization
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>get apple</dfn> can be referenced as
<a>get apples</a>
<a>get apple</a>
<a data-lt="get apple">obtain apples</a>.
</dfn>
<dfn data-lt="foo">bar</a> can be referenced as
<a>foo</a>
<a>bar</a>
<a>bars</a>
<a data-lt="foo">baz</a>
<a data-lt="bar">baz</a>
<a data-lt="bars">baz</a>
</dfn>
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