Skip to content

Commit

Permalink
fix: remove trim at the end of mermaid code (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
smsochneg authored Apr 25, 2024
1 parent e4f25db commit 298f2ad
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 298f2ad

Please sign in to comment.