1+ /* eslint-env browser */
12/* global CodeMirror, $, editor, Cookies */
23import { options , Alignment , FormatType } from '@susisu/mte-kernel'
34import debounce from 'lodash/debounce'
@@ -13,7 +14,7 @@ import { availableThemes } from './constants'
1314
1415// Storage utility class for localStorage operations
1516class Storage {
16- static get ( key , defaultValue = null ) {
17+ static get ( key , defaultValue = null ) {
1718 try {
1819 const value = localStorage . getItem ( key )
1920 return value !== null ? value : defaultValue
@@ -23,7 +24,7 @@ class Storage {
2324 }
2425 }
2526
26- static set ( key , value , options = { } ) {
27+ static set ( key , value , options = { } ) {
2728 try {
2829 localStorage . setItem ( key , value )
2930 return true
@@ -33,7 +34,7 @@ class Storage {
3334 }
3435 }
3536
36- static remove ( key ) {
37+ static remove ( key ) {
3738 try {
3839 localStorage . removeItem ( key )
3940 return true
@@ -216,13 +217,13 @@ export default class Editor {
216217 CodeMirror . defineMode ( 'markmap' , function ( config , modeConfig ) {
217218 return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'gfm' ) , ignoreOverlay )
218219 } )
219-
220+
220221 // Migrate preferences from cookies to localStorage
221222 this . migratePreferences ( )
222223 }
223224
224225 // Migrate preferences from cookies to localStorage
225- migratePreferences ( ) {
226+ migratePreferences ( ) {
226227 // Only run migration if window and localStorage are available
227228 if ( typeof window === 'undefined' || typeof localStorage === 'undefined' || typeof Cookies === 'undefined' ) {
228229 return
0 commit comments