From 963100fb27a88d444684ddb9a5d9dea31d4cd0ea Mon Sep 17 00:00:00 2001 From: RafidMuhymin Date: Sat, 16 Jul 2022 09:47:09 +0000 Subject: [PATCH] [ci] format --- packages/markdown/remark/src/rehype-collect-headers.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/markdown/remark/src/rehype-collect-headers.ts b/packages/markdown/remark/src/rehype-collect-headers.ts index 9b9a437301..50a9c5da1f 100644 --- a/packages/markdown/remark/src/rehype-collect-headers.ts +++ b/packages/markdown/remark/src/rehype-collect-headers.ts @@ -53,11 +53,11 @@ export default function createCollectHeaders() { node as any ).value = `<${node.tagName} id={${node.properties.id}}>${raw}`; } else { - let slug = slugger.slug(text); - - if (slug.endsWith('-')) slug = slug.slice(0, -1); - - node.properties.id = slug; + let slug = slugger.slug(text); + + if (slug.endsWith('-')) slug = slug.slice(0, -1); + + node.properties.id = slug; } }