diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-13 00:04:13 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-13 11:06:46 +0800 |
commit | 2e6cf32372757b5622197155590b6c939181da52 (patch) | |
tree | f0e7a3efe0b106995e57b182dd39f48beeb1e844 | |
parent | 0bb795fb1d3fb4c5e7a963fa2fb31904d2cc0f83 (diff) |
fix: compare anchor name by lower-case
-rw-r--r-- | src/editor.mjs | 2 |
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 | */ |
54 | const validateAnchorName = anchorName => | 54 | const 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 |