Using Markdown to insert html code works differently in local and production environment

I have an about page:
https://www.askwinston.xyz/about/
the script works there.

But when I am trying to edit the about page locally, the same code breaks.
image

I tried without type="text/javascript", add more empty lines in-between input and script blocks etc.

No luck.

Could anyone suggest why it likes this?

I have not figured out why it works on production whereas not in local.

But a workaround is to put the JS code in a separated like and the html code in Markdown calls that function.

If nobody responses to this thread, I will make this workaround as a solution.

I encountered a similar problem with MathML in Markdown suddenly breaking after upgrading Ghost back when I was using it, and I’m seeing what appears to be the same cause in your screenshot: the HTML block contains blank lines.

I believe this is fine in vanilla Markdown, but some Markdown variants like CommonMark might not convert this as intended due to them using different rules to determine when an HTML block starts and ends.

As such, I suspect that your local Markdown interpreter uses a different Markdown flavor than the one used for your final build. Can you verify?

thanks man, checked but the issue persists.