Skip to content

Commit

Permalink
fix: admonitions with custom titles now include them when using the i…
Browse files Browse the repository at this point in the history
…nserted with title command (close #145)
  • Loading branch information
valentine195 committed Feb 18, 2022
1 parent 9c9e6ac commit 7034477
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,9 +931,10 @@ ${editor.getDoc().getSelection()}
if (checking) return admonition.command;
if (admonition.command) {
try {
const title = admonition.title ?? ""
editor.getDoc().replaceSelection(
`\`\`\`ad-${admonition.type}
title:
title: ${title}
${editor.getDoc().getSelection()}
Expand Down

0 comments on commit 7034477

Please sign in to comment.