1.0.0 • Published 4 years ago

sanitize-latex v1.0.0

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

sanitize-latex

Sanitize hazardous LaTeX symbols from your strings.

Install

npm install sanitize-latex

Usage

const sanitize = require('sanitize-latex')

const unsanitizedString = '\\ ${Hello} %there^'
const sanitizedString = sanitize(unsanitizedString)

console.log(sanitizedString) // \textbackslash{} \$\{Hello\} \%there\textasciicircum{}

API

sanitize(str)

str {String}

The LaTeX string to be normalized.

License

MIT