I was using Rich Text rather than Markdown, so when saving the file it stripped the empty line between the html and the script block which breaks the javascript.
I can see my script added from Markdown is on the page, but the page still complains cannot find subscribe(); even I used Markdown and have empty lines in-between.