mirror of
https://github.com/mayurankv/Obsidian-Code-Styler.git
synced 2026-07-22 08:10:29 +00:00
Add frontmatter setting correction
This commit is contained in:
parent
94476a024d
commit
f6bbddd751
1 changed files with 2 additions and 0 deletions
|
|
@ -353,6 +353,8 @@ function findCodeblocks(view: EditorView): Array<SyntaxNodeRef> {
|
|||
|
||||
function parseIgnoreFrontmatter(doc: Text): boolean {
|
||||
//TODO (@mayurankv) Improve this function to use plugin.app.metadataCache.getCache(filePath)?.frontmatter?.['codeblock-customizer-ignore'] - need filePath
|
||||
if (typeof doc?.text === 'undefined')
|
||||
return false
|
||||
const start = doc.text.indexOf('---');
|
||||
if (start === -1 || doc.text.slice(0,start).some((line: string) => line.trim()!==''))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue