Skip to content

Commit 56efe33

Browse files
Refine footnote paragraph splitting pattern
Agent-Logs-Url: https://github.com/ThisIs-Developer/Markdown-Viewer/sessions/6b8ce336-b6dc-4563-af82-e4353ea44c7f Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com>
1 parent 9080159 commit 56efe33

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

desktop-app/resources/js/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ document.addEventListener("DOMContentLoaded", function () {
321321
function renderDefinitionContent(content, options = {}) {
322322
const { appendHtml = "" } = options;
323323
const paragraphs = String(content || "")
324-
.split(/\n[ \t]*\n/)
324+
.split(/\n(?:[ \t]*\n)+/)
325325
.map((paragraph) => paragraph.trim())
326326
.filter(Boolean);
327327

script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ document.addEventListener("DOMContentLoaded", function () {
321321
function renderDefinitionContent(content, options = {}) {
322322
const { appendHtml = "" } = options;
323323
const paragraphs = String(content || "")
324-
.split(/\n[ \t]*\n/)
324+
.split(/\n(?:[ \t]*\n)+/)
325325
.map((paragraph) => paragraph.trim())
326326
.filter(Boolean);
327327

0 commit comments

Comments
 (0)