Skip to content

Commit

Permalink
Formatting changes only
Browse files Browse the repository at this point in the history
  • Loading branch information
dullage authored and Gedulis12 committed Aug 7, 2023
1 parent 26e6b56 commit 3aeb903
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions flatnotes/src/components/NoteViewerEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -211,7 +211,6 @@ export default {
},
data: function () {
return {
editMode: false,
draftSaveTimeout: null,
Expand All @@ -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],
},
};
},
Expand Down

0 comments on commit 3aeb903

Please sign in to comment.