Package Exports
- remark-textr
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remark-textr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
remark-textr
remark plugin to make your typography better with Textr.
Install
npm:
npm install remark-textrUse
Say we have the following file, example.md:
## spread operator...
```js
function(...args) { return args; }
```And our script, example.js, looks as follows:
var vfile = require('to-vfile')
var remark = require('remark')
var textr = require('remark-textr')
remark()
.use(textr, {plugins: [ellipses]})
.process(vfile.readSync('example.md'), function(err, file) {
if (err) throw err
console.log(String(file))
})
// Textr plugin: just a function to replace triple dots to ellipses.
function ellipses(input) {
return input.replace(/\.{3}/gim, '…')
}Yields:
## spread operator…
```js
function(...args) { return args; }
```API
remark().use(textr[, config])
Make your typography better with Textr.
config
config.plugins
List of Textr plugins (Array.<string|Function>?).
If strings are passed in, those are loaded with require.
Textr plugins are available on npm, labelled with textr
keyword.
You can also create them yourself, as shown in the example above.
config.options
Textr options (Object?).
For example, you may want to set the ISO 639 locale code of the
content, which is important for stuff like the correct primary and secondary
quotes.
Contribute
See contributing.md in remarkjs/.github for ways
to get started.
See support.md for ways to get help.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.