This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from denysdovhan/greenkeeper-update-all
Update all dependencies 🌴
- Loading branch information
Showing
3 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.es5.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import mdast from 'mdast'; | ||
import mdtextr from 'mdast-textr'; | ||
import remark from 'remark'; | ||
import remarkTextr from 'remark-textr'; | ||
import base from 'typographic-base'; | ||
|
||
export default function typographicMarkdown( | ||
text = '', | ||
options = { locale: 'en-us' }, | ||
plugins = [ base ] | ||
) { | ||
return mdast.use(mdtextr, { | ||
return remark().use(remarkTextr, { | ||
options: Array.isArray(options) ? { locale: 'en-us' } : options, | ||
plugins: Array.isArray(options) ? options : plugins | ||
}).process(text).trim(); | ||
}).process(text).toString().trim(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters