diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-23 20:32:57 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-23 20:50:23 +0800 |
| commit | 81e075ffea3db9f4bd7773189fa624fd0feb096f (patch) | |
| tree | 6cb9a2d1ad96ddc082939bd80b59d247b4218a93 /src | |
| parent | df606a1f7bcb32747085972b740c6685ffabcb71 (diff) | |
style: standardjs
Diffstat (limited to 'src')
| -rw-r--r-- | src/Layout.mjs | 2 | ||||
| -rw-r--r-- | src/editor.mjs | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/src/Layout.mjs b/src/Layout.mjs index 8c6a8ea..c24a2bc 100644 --- a/src/Layout.mjs +++ b/src/Layout.mjs | |||
| @@ -263,7 +263,7 @@ export class Overlay extends Layout { | |||
| 263 | * @param {HTMLElement} htmlHolder | 263 | * @param {HTMLElement} htmlHolder |
| 264 | * @param {HTMLElement[]} blocks | 264 | * @param {HTMLElement[]} blocks |
| 265 | */ | 265 | */ |
| 266 | leaveHandler = ({ htmlHolder, blocks }) => { | 266 | leaveHandler = ({ blocks }) => { |
| 267 | const resumeFromDraggable = block => { | 267 | const resumeFromDraggable = block => { |
| 268 | const draggableContainer = block.closest('.draggable-block') | 268 | const draggableContainer = block.closest('.draggable-block') |
| 269 | if (!draggableContainer) return | 269 | if (!draggableContainer) return |
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+)["'])?/ | |||
| 49 | let refLinks = [] | 49 | let 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 | */ | ||
| 57 | const 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 |