mirror of
https://github.com/mayurankv/Obsidian-Code-Styler.git
synced 2026-07-22 08:10:29 +00:00
Fix regex
This commit is contained in:
parent
7884da9e6c
commit
2e80fe61ad
4 changed files with 8 additions and 8 deletions
6
main.js
6
main.js
File diff suppressed because one or more lines are too long
|
|
@ -146,11 +146,11 @@ export function parseCodeblockParameters(parameterLine: string, theme: CodeStyle
|
|||
if (rmdMatch)
|
||||
parameterLine = "title:" + parameterLine;
|
||||
|
||||
const parameterStrings = parameterLine.match(/(?:[^\s,"']+|"[^"]*"|'[^']*')+/g);
|
||||
const parameterStrings = parameterLine.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);
|
||||
if (!parameterStrings)
|
||||
return codeblockParameters;
|
||||
|
||||
parameterStrings.forEach((parameterString) => parseCodeblockParameterString(parameterString,codeblockParameters,theme));
|
||||
parameterStrings.forEach((parameterString) => parseCodeblockParameterString(parameterString.replace(/(?:^,|,$)/g, ""),codeblockParameters,theme));
|
||||
return codeblockParameters;
|
||||
}
|
||||
async function pluginAdjustParameters(codeblockParameters: CodeblockParameters, plugin: CodeStylerPlugin, plugins: Record<string,ExternalPlugin>, codeblockLines: Array<string>, sourcePath?: string): Promise<CodeblockParameters> {
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ pre.code-styler-pre div:last-child > .code-styler-line-number {
|
|||
width: unset;
|
||||
}
|
||||
.code-styler-gutter-highlight pre.code-styler-pre [class*="code-styler-line-highlighted"] .code-styler-line-number {
|
||||
background-color: var(--gradient-background-colour);
|
||||
background-color: var(--gradient-background-colour) !important;
|
||||
}
|
||||
.code-styler-active-line-highlight.code-styler-gutter-highlight .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active .code-styler-line-number,
|
||||
.code-styler-active-line-highlight-codeblock.code-styler-gutter-highlight .markdown-source-view .HyperMD-codeblock[class*="code-styler-line"].cm-active .code-styler-line-number,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue