From 351592d4373c5c15a27db1035cfbb5a277991b00 Mon Sep 17 00:00:00 2001 From: hole-thu Date: Fri, 26 Jun 2026 00:20:52 +0800 Subject: [PATCH] Update heading rules --- src/Common.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Common.js b/src/Common.js index b8bc0b3..e129576 100644 --- a/src/Common.js +++ b/src/Common.js @@ -148,8 +148,7 @@ export class HighlightedMarkdown extends Component { { shouldProcessNode: (node) => /^h[123456]$/.test(node.name), processNode(node, children, index) { - let currentLevel = +node.name[1]; - if (currentLevel < 3) currentLevel = 3; + const currentLevel = Math.min(+node.name[1] + 2, 5); const HeadingTag = `h${currentLevel}`; return {children}; },