mirror of
https://github.com/mayurankv/Obsidian-Code-Styler.git
synced 2026-07-22 08:10:29 +00:00
update
This commit is contained in:
parent
4284f88529
commit
b86a8e7cff
4 changed files with 3 additions and 61 deletions
2
.todo
2
.todo
|
|
@ -2,9 +2,9 @@ Features:
|
|||
Other:
|
||||
☐ YAML Frontmatter Highlighting
|
||||
☐ https://raw.githubusercontent.com/deathau/cm-editor-syntax-highlight-obsidian/main/mode/yaml-frontmatter/yaml-frontmatter.js
|
||||
☐ Embed other online markdown files?
|
||||
|
||||
Code Referencing:
|
||||
☐ reference codeblock syntax highlighting
|
||||
☐ Local reference
|
||||
☐ Prevent clicking reading mode external links causing fold (@low)
|
||||
☐ File watcher? (@low)
|
||||
|
|
|
|||
60
main.js
60
main.js
File diff suppressed because one or more lines are too long
|
|
@ -24,7 +24,6 @@ export function createCodeblockCodeMirrorExtensions(settings: CodeStylerSettings
|
|||
class ExamplePlugin implements PluginValue {
|
||||
constructor() {
|
||||
addReferenceSyntaxHighlight(window.CodeMirror);
|
||||
addYamlFrontmatterSyntaxHighlighting(window.CodeMirror);
|
||||
} // view: EditorView
|
||||
update() {} // update: ViewUpdate
|
||||
destroy() {}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export function addYamlFrontmatterSyntaxHighlighting(CodeMirror: typeof window.C
|
|||
const START = 0, FRONTMATTER = 1, BODY = 2;
|
||||
CodeMirror.defineMode("yaml-frontmatter", function(config, parserConfig) {
|
||||
const yamlMode = CodeMirror.getMode(config, "yaml");
|
||||
console.log(yamlMode);
|
||||
const innerMode = CodeMirror.getMode(config, parserConfig?.base ?? "markdown");
|
||||
|
||||
function curMode(state) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue