From 2e6cf32372757b5622197155590b6c939181da52 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 13 Oct 2024 00:04:13 +0800 Subject: fix: compare anchor name by lower-case --- src/editor.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 = [] * @returns {boolean} True if the anchor name is unique, false otherwise */ const validateAnchorName = anchorName => - !refLinks.find(obj => obj.ref === anchorName) + !refLinks.find(obj => obj.ref.toLowerCase() === anchorName.toLowerCase()) /** * Appends a reference link to the CodeMirror instance -- cgit v1.2.3-70-g09d2