Skip to content

Commit d19311d

Browse files
committed
v1.4.1
1 parent 88a5f13 commit d19311d

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "remark-flexible-containers",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Remark plugin to add custom containers with customizable properties in markdown",
55
"type": "module",
66
"exports": "./dist/esm/index.js",
@@ -55,7 +55,7 @@
5555
"@eslint/js": "^9.34.0",
5656
"@types/node": "^24.3.0",
5757
"@vitest/coverage-v8": "^3.2.4",
58-
"@vitest/eslint-plugin": "^1.3.4",
58+
"@vitest/eslint-plugin": "^1.3.6",
5959
"dedent": "^1.6.0",
6060
"eslint": "^9.34.0",
6161
"eslint-config-prettier": "^10.1.8",

src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,6 @@ export const plugin: Plugin<[FlexibleContainerOptions?], Root> = (options) => {
529529
? analyzeChild(node, fence) // mutates the node
530530
: analyzeChildren(node, fence); // mutates the node
531531

532-
// const { flag, type, rawtitle } = analyzeParagraph(node, fence); // mutates the node
533-
534532
const { containerProps, title, titleProps } = extractSpecificIdentifiers(
535533
rawtitle?.trim(),
536534
);
@@ -545,7 +543,7 @@ export const plugin: Plugin<[FlexibleContainerOptions?], Root> = (options) => {
545543
const isParagraphWithEmptyText = checkParagraphWithEmptyText(node);
546544

547545
// is the paragraph node has only one child with empty text, don't add that paragraph node as a child
548-
// meaningly, don't produce empty <p />
546+
// meaningly, don't produce empty <p>
549547
const containerChildren = isParagraphWithEmptyText
550548
? [...(titleNode ? [titleNode] : [])]
551549
: [...(titleNode ? [titleNode] : []), node];
@@ -600,11 +598,9 @@ export const plugin: Plugin<[FlexibleContainerOptions?], Root> = (options) => {
600598
}
601599

602600
// if there is no content and type do not construct the container
603-
604601
if (!containerChildren.length && !type) return;
605602

606603
// if there is no content but type, then continue to construct the container
607-
608604
const titleNode = constructTitle(type, title, titleProps);
609605

610606
if (titleNode) containerChildren.splice(0, 0, titleNode);

0 commit comments

Comments
 (0)