fix(admonition): inserting new admonitions of given type not working

This commit is contained in:
Elian Doran 2025-03-15 10:49:27 +02:00
parent 80de28c617
commit c3a9582208

View File

@ -199,7 +199,9 @@ export default class AdmonitionCommand extends Command {
let quote = findQuote( groupRange.start );
if ( !quote ) {
quote = writer.createElement( 'aside', { type });
const attributes: Record<string, unknown> = {};
attributes[ADMONITION_TYPE_ATTRIBUTE] = type;
quote = writer.createElement( 'aside', attributes);
writer.wrap( groupRange, quote );
} else if (quote.is("element")) {