aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-23 20:32:57 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-23 20:50:23 +0800
commit81e075ffea3db9f4bd7773189fa624fd0feb096f (patch)
tree6cb9a2d1ad96ddc082939bd80b59d247b4218a93 /src/editor.mjs
parentdf606a1f7bcb32747085972b740c6685ffabcb71 (diff)
style: standardjs
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index 3f8f27d..f3b812a 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -49,15 +49,6 @@ const refLinkPattern = /\[([^\x5B\x5D]+)\]:\s+(\S+)(\s["'](\S+)["'])?/
49let refLinks = [] 49let refLinks = []
50 50
51/** 51/**
52 * Validates if the given anchor name is unique
53 *
54 * @param {string} anchorName - The anchor name to validate
55 * @returns {boolean} True if the anchor name is unique, false otherwise
56 */
57const validateAnchorName = anchorName =>
58 !refLinks.find(obj => obj.ref.toLowerCase() === anchorName.toLowerCase())
59
60/**
61 * Appends a reference link to the CodeMirror instance 52 * Appends a reference link to the CodeMirror instance
62 * 53 *
63 * @param {CodeMirror} cm - The CodeMirror instance 54 * @param {CodeMirror} cm - The CodeMirror instance