
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
remark-textr
Advanced tools
Make your typography better with remark and Textr (skipping code).
npm:
npm install remark-textr
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')
// textr plugin — just function to replace triple dots to ellipses
function ellipses(input) {
return input.replace(/\.{3}/gim, '…')
}
remark()
.use(textr, {plugins: [ellipses]})
.process(vfile.readSync('example.md'), function(err, file) {
if (err) throw err
console.log(String(file))
})
Yields:
## spread operator…
```js
function(...args) { return args; }
```
remark.use(textr[, config])
config.plugins
List of Textr plugins (Array.<string|Function>?
).
They are available on npm, labelled with textr keyword.
Also you can easily create new one, as shown in the example above.
If strings are passed in, those are required.
config.options
Passed to Textr as it’s options (Object?
).
For example, you may want to set your ISO 639 locale code.
It’s important for stuff like the correct primary and secondary quotes.
See contributing.md
in remarkjs/remark
for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
remark plugin to improve typography with Textr
The npm package remark-textr receives a total of 26,693 weekly downloads. As such, remark-textr popularity was classified as popular.
We found that remark-textr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.