docsify-latex icon indicating copy to clipboard operation
docsify-latex copied to clipboard

Regex support in inlineMath

Open benoitdr opened this issue 1 year ago • 0 comments

To align docsify-latex behavior on pandoc, it would be useful to support regex in docsify inlineMath option.

From pandoc documentation : Anything between two $ characters will be treated as TeX math. The opening $ must have a non-space character immediately to its right, while the closing $ must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math.

Having regex support in inlineMath options would allow to have the same logic :

window.$docsify = {
  // ...
  latex: {
    inlineMath   : [['<regex here>', <regex here>']]
  }
};

benoitdr avatar Oct 30 '24 07:10 benoitdr