Skip to content

Commit

Permalink
fix: remove trim at the end of mermaid code
Browse files Browse the repository at this point in the history
  • Loading branch information
smsochneg committed Apr 22, 2024
1 parent e4f25db commit 7aad51b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function transform(options: Partial<PluginOptions> = {}) {

md.renderer.rules.mermaid = (tokens, idx) => {
const token = tokens[idx];
const code = encodeURIComponent(token.content.trim());
const code = encodeURIComponent(token.content.trimStart());

return `<div class="mermaid" data-content="${code}"></div>`;
};
Expand Down

0 comments on commit 7aad51b

Please sign in to comment.