Skip to content

Commit

Permalink
patch: remove head ! marks
Browse files Browse the repository at this point in the history
  • Loading branch information
LumaKernel committed Feb 11, 2024
1 parent ad7b779 commit 2f48678
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/my-to-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ export const myToText = (
const rawAttr = getAttrByName(node, lumaTermAttributes.rawTermRef);
if (rawAttr?.type !== "mdxJsxAttribute") return STEP_OVER;
if (typeof rawAttr.value !== "string") return STEP_OVER;
let text = rawAttr.value;
if (text.startsWith("!")) {
text = text.slice(1);
}
return REPLACE(
{
type: "text",
value: rawAttr.value,
value: text,
} satisfies Text,
STEP_OVER,
);
Expand Down

0 comments on commit 2f48678

Please sign in to comment.