Skip to content

Commit 1cd256b

Browse files
committed
fix markdown headings
1 parent a7ac510 commit 1cd256b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

embedg-app/src/discord/markdown.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ const bodyRules = {
276276
}),
277277
heading: Object.assign({}, markdown.defaultRules.heading, {
278278
match: function (source, state) {
279-
if (state.prevCapture === null || state.prevCapture[0] === "\n") {
279+
if (
280+
state.prevCapture === null ||
281+
state.prevCapture[state.prevCapture.length - 1] === "\n"
282+
) {
280283
const re = /^(#{1,3}) +([^\n]+?)(\n|$)/;
281284
return re.exec(source);
282285
}

0 commit comments

Comments
 (0)