Skip to content

Instantly share code, notes, and snippets.

@A
Created April 11, 2015 20:48
Show Gist options
  • Select an option

  • Save A/786595d0b9bf8cd7b487 to your computer and use it in GitHub Desktop.

Select an option

Save A/786595d0b9bf8cd7b487 to your computer and use it in GitHub Desktop.
var text = textr({ locale: 'ru' })
.use(markdown)
.use(escapeHTML)
.use(quotes)
;
function quotes(text, ctx) {
return _quotes(text, ctx);
}
function markdown(text, ctx) {
ctx.document = reqiure('markdown-to-ast')(text);
}
function typographer(text, ctx) {
ctx.document.children
.filter(function (child) { return type !== 'CodeBlock'; })
.each(function (child) { child.raw = tf(child.raw); })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment