Formatting changes only
authorAdam Dullage <redacted>
Sun, 2 Jul 2023 13:26:51 +0000 (14:26 +0100)
committerAdam Dullage <redacted>
Sun, 2 Jul 2023 13:26:51 +0000 (14:26 +0100)
flatnotes/src/components/NoteViewerEditor.vue

index f3225d714b71638d2be524ce05f2038556670a97..dbdc0cc04148bba759e47d064656fc5abdd82643 100644 (file)
@@ -179,24 +179,24 @@ import api from "../api";
 import codeSyntaxHighlight from "@toast-ui/editor-plugin-code-syntax-highlight/dist/toastui-editor-plugin-code-syntax-highlight-all.js";
 
 const customHTMLRenderer = {
-  heading( node, { entering, getChildrenText } ) {
+  heading(node, { entering, getChildrenText }) {
     const tagName = `h${node.level}`;
 
     if (entering) {
       return {
-        type: 'openTag',
+        type: "openTag",
         tagName,
         attributes: {
           id: getChildrenText(node)
-             .toLowerCase()
-              .replace(/[^a-z0-9-\s]*/g, '')
-              .trim()
-              .replace(/\s/g, '-')
-        }
+            .toLowerCase()
+            .replace(/[^a-z0-9-\s]*/g, "")
+            .trim()
+            .replace(/\s/g, "-"),
+        },
       };
     }
-    return { type: 'closeTag', tagName };
-  }
+    return { type: "closeTag", tagName };
+  },
 };
 
 export default {
@@ -211,7 +211,6 @@ export default {
   },
 
   data: function () {
-
     return {
       editMode: false,
       draftSaveTimeout: null,
@@ -222,13 +221,14 @@ export default {
       noteLoadFailedIcon: null,
       noteLoadFailedMessage: "Failed to load Note",
       viewerOptions: {
-       customHTMLRenderer: customHTMLRenderer,
+        customHTMLRenderer: customHTMLRenderer,
         plugins: [codeSyntaxHighlight],
         extendedAutolinks: true,
       },
       editorOptions: {
         customHTMLRenderer: customHTMLRenderer,
-        plugins: [codeSyntaxHighlight] },
+        plugins: [codeSyntaxHighlight],
+      },
     };
   },
 
git clone https://git.99rst.org/PROJECT