Closed vanderheijden86 closed 7 years ago
Hey. Strange but customizing style var works on my machine. Lets see. Stylesheet file is coded into -preview.html
file for sake of default css for the page only. It is replaced by the style var after page is connected to emacs buffer. So, here are 2 options possible: javascipt error seen in browser console, which prevents from replacing stylesheet tag, or it's variable to blame, meaning new value didn't apply. If you find nothing strange in the browser console, then please check the output of M-x describe-variable RET markdown-preview-style RET
.
Hi, thanks for the fast reply. No browser erros, it's value is:
markdown-preview-style is a variable defined in `markdown-preview-mode.el'. Its value is "https://sindresorhus.com/github-markdown-css/github-markdown.css"
When I inspect with Chrome I see that the stylesheet value in the header is updated to reflect the correct link, however the actual styles are not applied to the elemens (h1, h2 etc). Strange...
Figured it out :-). When I change "<article id=", to "<article class=" it works. Apparently markdown changed from setting the id of the article to setting the class.
I see. It's a github markdown css file. I guess, this css should be paired with appropriate markdown processor.
One quick question, do you know how I can pair the right processor? I can't find a markdown binary which does exactly render like github. Instead I use a command line utility named grip now. Can I hook this up with markdown-preview-mode?
Sure. That's done via customizing markdown-command
variable.
I guess, thanks to @zenkiezhu this can be closed now.
Altough I change the style sheet by customizing markdown-preview-style, I still am not able to get the right stylesheet connected in the preview. I check this out and in the .html file the link to the standard thomasf.github stylesheet is present. Can you help me out? Thanks a lot.