aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-13 00:04:13 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-13 11:06:46 +0800
commit2e6cf32372757b5622197155590b6c939181da52 (patch)
treef0e7a3efe0b106995e57b182dd39f48beeb1e844 /src/editor.mjs
parent0bb795fb1d3fb4c5e7a963fa2fb31904d2cc0f83 (diff)
fix: compare anchor name by lower-case
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index cdbd5cc..ad1a863 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -52,7 +52,7 @@ let refLinks = []
52 * @returns {boolean} True if the anchor name is unique, false otherwise 52 * @returns {boolean} True if the anchor name is unique, false otherwise
53 */ 53 */
54const validateAnchorName = anchorName => 54const validateAnchorName = anchorName =>
55 !refLinks.find(obj => obj.ref === anchorName) 55 !refLinks.find(obj => obj.ref.toLowerCase() === anchorName.toLowerCase())
56 56
57/** 57/**
58 * Appends a reference link to the CodeMirror instance 58 * Appends a reference link to the CodeMirror instance