All Projects → remarkjs → Remark Textr

remarkjs / Remark Textr

Licence: mit
plugin to make your typography better with Textr

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Remark Textr

Showdown Htmlescape
Plugin for Showdown to prevent the use of arbitrary HTML and allow only the specific Markdown syntax.
Stars: ✭ 6 (-76.92%)
Mutual labels:  markdown
Mdx linkify
Link recognition for Python Markdown
Stars: ✭ 18 (-30.77%)
Mutual labels:  markdown
P5 Hershey Js
p5.js Hershey Vector Font Library
Stars: ✭ 23 (-11.54%)
Mutual labels:  typography
Silverstripe Markdowntextareafield
Supercharged textarea with markdown preview for Silverstripe CMS
Stars: ✭ 6 (-76.92%)
Mutual labels:  markdown
Crisscross
A Markdown-centric template engine for batch offline document generation.
Stars: ✭ 18 (-30.77%)
Mutual labels:  markdown
Jbake
Java based open source static site/blog generator for developers & designers.
Stars: ✭ 904 (+3376.92%)
Mutual labels:  markdown
Readme2tex
Renders TeXy Math for Github Readmes
Stars: ✭ 826 (+3076.92%)
Mutual labels:  markdown
Markitdown
📱 A React app to preview and edit Markdown✍. You can also export it as HTML.
Stars: ✭ 26 (+0%)
Mutual labels:  markdown
Phd thesis markdown
Template for writing a PhD thesis in Markdown
Stars: ✭ 898 (+3353.85%)
Mutual labels:  markdown
Gridsome Starter Liebling
Grisome starter based on Ghost Liebling and tailwindcss.
Stars: ✭ 23 (-11.54%)
Mutual labels:  markdown
Cocalc
CoCalc: Collaborative Calculation in the Cloud
Stars: ✭ 888 (+3315.38%)
Mutual labels:  markdown
Edinote
Note taking web application for self-hosting. Offers tagging & Markdown support; can be used as a simple alternative to Evernote.
Stars: ✭ 17 (-34.62%)
Mutual labels:  markdown
Lining.js
An easy to use javascript plugin offers you complete DOWN-TO-THE-LINE control for radical web typography.
Stars: ✭ 907 (+3388.46%)
Mutual labels:  typography
Markdown Wasm
Markdown parser and HTML generator implemented in WebAssembly, based on md4c
Stars: ✭ 833 (+3103.85%)
Mutual labels:  markdown
Easy Pandoc Templates
A collection of portable pandoc templates with no dependencies
Stars: ✭ 23 (-11.54%)
Mutual labels:  markdown
Nextein
A static site generator with markdown + react for Next.js
Stars: ✭ 825 (+3073.08%)
Mutual labels:  markdown
Marked
Markdown rendering as a service.
Stars: ✭ 19 (-26.92%)
Mutual labels:  markdown
Mdviewer
Minimalistic Markdown viewer/converter with built-in Css stylesheets support.
Stars: ✭ 26 (+0%)
Mutual labels:  markdown
Fastmatter
👀 A fast frontmatter parser. Supports both string and stream inputs.
Stars: ✭ 25 (-3.85%)
Mutual labels:  markdown
Markdown2document
turn markdown files to a PDF or HTML document
Stars: ✭ 22 (-15.38%)
Mutual labels:  markdown

remark-textr

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to make your typography better with Textr.

Install

npm:

npm install remark-textr

Use

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.

Security

Use of remark-textr does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks. Textr operates on text nodes, which are always escaped by remark.

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.

License

MIT © Denys Dovhan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].