mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-05 07:37:24 +03:00
Merge pull request #1463 from trevorgunn/DMO-hover
Pass 'DeclareMathOperator's to mathjax
This commit is contained in:
commit
aeaa583f2c
@ -130,7 +130,7 @@ export class HoverProvider implements vscode.HoverProvider {
|
|||||||
if (!configuration.get('hover.preview.newcommand.parseTeXFile.enabled') as boolean) {
|
if (!configuration.get('hover.preview.newcommand.parseTeXFile.enabled') as boolean) {
|
||||||
return commandsString
|
return commandsString
|
||||||
}
|
}
|
||||||
const regex = /(\\(?:(?:(?:re)?new|provide)command(\*)?{\\[a-zA-Z]+}(?:\[[^\[\]\{\}]*\])*{.*})|\\(?:def\\[a-zA-Z]+(?:#[0-9])*{.*}))/gm
|
const regex = /(\\(?:(?:(?:(?:re)?new|provide)command|DeclareMathOperator)(\*)?{\\[a-zA-Z]+}(?:\[[^\[\]\{\}]*\])*{.*})|\\(?:def\\[a-zA-Z]+(?:#[0-9])*{.*}))/gm
|
||||||
const commands: string[] = []
|
const commands: string[] = []
|
||||||
const noCommentContent = content.replace(/([^\\]|^)%.*$/gm, '$1') // Strip comments
|
const noCommentContent = content.replace(/([^\\]|^)%.*$/gm, '$1') // Strip comments
|
||||||
let result
|
let result
|
||||||
|
Loading…
Reference in New Issue
Block a user