0.3.0 • Published 7 years ago
gitbook-plugin-dashing v0.3.0
Dashing for GitBook
Derive en- and em-dashes from hyphens.
Installation
Add the following entries to your book.json
:
{
"plugins": [
"dashing"
],
"pluginConfig": {
"dashing": {
"selectors": [
"h1, h2, h3, h4, h5, h6, p, ul, ol"
]
}
}
}
If you'd like to maintain a local installation of the plugin, run the following:
$ npm install --save-dev gitbook-plugin-dashing
Usage
This plugin replaces ---
with —
and --
with –
in each page's content for each of the supplied selectors. Just replace hyphens with the appropriate character, like so:
# Sample
The 2010--2011 season was our best yet.
Upon discovering the errors---all 124 of them---the publisher immediately recalled the books.
Sample
The 2010–2011 season was our best yet.
Upon discovering the errors—all 124 of them—the publisher immediately recalled the books.
Testing
Tests are written with Jasmine and use the GitBook integration tests framework. Run them with:
$ npm test