1- import { App , Component , debounce , MarkdownPostProcessorContext , MarkdownView , Plugin , PluginSettingTab , Setting } from "obsidian" ;
1+ import {
2+ App ,
3+ Component ,
4+ debounce ,
5+ MarkdownPostProcessorContext ,
6+ MarkdownView ,
7+ Plugin ,
8+ PluginSettingTab ,
9+ Setting ,
10+ } from "obsidian" ;
211import { renderErrorPre } from "ui/render" ;
312import { FullIndex } from "data-index/index" ;
413import { parseField } from "expression/parse" ;
@@ -11,7 +20,11 @@ import { currentLocale } from "util/locale";
1120import { DateTime } from "luxon" ;
1221import { DataviewInlineApi } from "api/inline-api" ;
1322import { replaceInlineFields } from "ui/views/inline-field" ;
14- import { inlineFieldsField , replaceInlineFieldsInLivePreview , workspaceLayoutChangeEffect } from "./ui/views/inline-field-live-preview" ;
23+ import {
24+ inlineFieldsField ,
25+ replaceInlineFieldsInLivePreview ,
26+ workspaceLayoutChangeEffect ,
27+ } from "./ui/views/inline-field-live-preview" ;
1528import { DataviewInit } from "ui/markdown" ;
1629import { inlinePlugin } from "./ui/lp-render" ;
1730import { Extension } from "@codemirror/state" ;
@@ -124,15 +137,15 @@ export default class DataviewPlugin extends Plugin {
124137 // Mainly intended to detect when the user switches between live preview and source mode.
125138 this . registerEvent (
126139 this . app . workspace . on ( "layout-change" , ( ) => {
127- this . app . workspace . iterateAllLeaves ( ( leaf ) => {
140+ this . app . workspace . iterateAllLeaves ( leaf => {
128141 if ( leaf . view instanceof MarkdownView && leaf . view . editor . cm ) {
129142 leaf . view . editor . cm . dispatch ( {
130- effects : workspaceLayoutChangeEffect . of ( null )
131- } )
143+ effects : workspaceLayoutChangeEffect . of ( null ) ,
144+ } ) ;
132145 }
133- } )
146+ } ) ;
134147 } )
135- )
148+ ) ;
136149 this . registerEditorExtension ( inlineFieldsField ) ;
137150 this . registerEditorExtension ( replaceInlineFieldsInLivePreview ( this . app , this . settings ) ) ;
138151 }
0 commit comments