@cylixlee/mdocx
Advanced tools
+3
-3
@@ -1164,3 +1164,3 @@ #!/usr/bin/env node | ||
| //#region src/extensions/latex.ts | ||
| const inlineRule = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:;%)\]–—?!。,:-]|$)/; | ||
| const inlineRuleNonStandard = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1/; | ||
| const blockRule = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/; | ||
@@ -1171,3 +1171,3 @@ /** | ||
| function latex(lexer) { | ||
| const ruleReg = inlineRule; | ||
| const ruleReg = inlineRuleNonStandard; | ||
| return { | ||
@@ -1181,3 +1181,3 @@ name: "latex", | ||
| if (index === -1) return; | ||
| if (index === 0 || indexSrc.charAt(index - 1) !== "$") { | ||
| if (index > -1) { | ||
| if (indexSrc.substring(index).match(ruleReg)) return index; | ||
@@ -1184,0 +1184,0 @@ } |
@@ -1191,3 +1191,3 @@ Object.defineProperties(exports, { | ||
| //#region src/extensions/latex.ts | ||
| const inlineRule = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:;%)\]–—?!。,:-]|$)/; | ||
| const inlineRuleNonStandard = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1/; | ||
| const blockRule = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/; | ||
@@ -1198,3 +1198,3 @@ /** | ||
| function latex(lexer) { | ||
| const ruleReg = inlineRule; | ||
| const ruleReg = inlineRuleNonStandard; | ||
| return { | ||
@@ -1208,3 +1208,3 @@ name: "latex", | ||
| if (index === -1) return; | ||
| if (index === 0 || indexSrc.charAt(index - 1) !== "$") { | ||
| if (index > -1) { | ||
| if (indexSrc.substring(index).match(ruleReg)) return index; | ||
@@ -1211,0 +1211,0 @@ } |
@@ -1159,3 +1159,3 @@ import { AlignmentType, BorderStyle, CheckBox, Document, ExternalHyperlink, FootnoteReferenceRun, HeadingLevel, ImageRun, LevelFormat, Math as Math$1, MathFraction, MathIntegral, MathRadical, MathRun, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Packer, Paragraph, Table, TableCell, TableRow, TextRun, UnderlineType, VerticalAlign, WidthType, XmlComponent } from "docx"; | ||
| //#region src/extensions/latex.ts | ||
| const inlineRule = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:;%)\]–—?!。,:-]|$)/; | ||
| const inlineRuleNonStandard = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1/; | ||
| const blockRule = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/; | ||
@@ -1166,3 +1166,3 @@ /** | ||
| function latex(lexer) { | ||
| const ruleReg = inlineRule; | ||
| const ruleReg = inlineRuleNonStandard; | ||
| return { | ||
@@ -1176,3 +1176,3 @@ name: "latex", | ||
| if (index === -1) return; | ||
| if (index === 0 || indexSrc.charAt(index - 1) !== "$") { | ||
| if (index > -1) { | ||
| if (indexSrc.substring(index).match(ruleReg)) return index; | ||
@@ -1179,0 +1179,0 @@ } |
+1
-1
| { | ||
| "name": "@cylixlee/mdocx", | ||
| "version": "0.2.5", | ||
| "version": "0.2.6", | ||
| "description": "Convert Markdown file to DOCX format", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
166076
-0.11%