jekyll-spaceship icon indicating copy to clipboard operation
jekyll-spaceship copied to clipboard

mermaid diagram cut the last char

Open copdips opened this issue 4 years ago • 3 comments

Hello,

When using this plugin with https://github.com/jeffreytse/jekyll-deploy-action to render mermaid in github pages. I'm currently facing the same issue discribed at https://github.com/mermaid-js/mermaid/issues/790.

As per https://github.com/mermaid-js/mermaid/issues/790#issuecomment-568624450, the newer API version seems to fix the issue,

I dont know how jeklly-spaceship works for mermaid, maybe just need to update the API version too to fix the issue.

https://mermaid-js.github.io/mermaid/#/n00b-gettingStarted?id=requirements-for-the-mermaid-api

copdips avatar Sep 13 '21 22:09 copdips

Hi @copdips

Thanks for your reporting, I used the below code to test, but I didn't see the issue, could you please provide me steps to reproduce this issue?

```mermaid!
graph TD
A[Something] -->|begets| B[Something]
```

The result in my environment:

2021-09-14_16-40

Thanks and Regards

jeffreytse avatar Sep 14 '21 08:09 jeffreytse

@jeffreytse

It's the rendering in github pages bugs as shown below:

image

And below is what I see in locally env where the rendering is good.

image

copdips avatar Sep 14 '21 21:09 copdips

@copdips Thanks for your useful information, basically it's a render issue of SVG image of Mermaid on calculating text size, core issue is to round the value to integer from float, if your graph direction is TB, it will not happen. I will try to research and settle down this issue as soon as possible with a compatibility solution.

jeffreytse avatar Sep 15 '21 03:09 jeffreytse