GitbookIO / kramed

A markdown (kramdown compatible) parser and compiler. Built for speed. (Fork of marked)
MIT License
223 stars 47 forks source link

Error with latex $||^$ #46

Open Vast-Stars opened 6 years ago

Vast-Stars commented 6 years ago

I change default renderer to hexo-render-kramed and then change some render rules in node_modules\kramed\lib\rules\inline.js :

//  escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/,
  escape: /^\\([`*\[\]()#$+\-.!_>])/,

//  em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
  em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,

and I found there is a error when rendering latex code ||x||^2. Is there any other way except using {||}^2 ?