Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code in posts only gets syntax highlighting in the live preview #248

Closed
tobyzerner opened this issue Aug 27, 2015 · 0 comments
Closed

Code in posts only gets syntax highlighting in the live preview #248

tobyzerner opened this issue Aug 27, 2015 · 0 comments

Comments

@tobyzerner
Copy link
Contributor

Steps to reproduce:

  1. Open up the reply composer and enter [code=php]$foo = "bar";[/code]
  2. Look at the live preview, and see the syntax highlighting
  3. Submit the reply
  4. Look at the post, and see no syntax highlighting

Expected behaviour:
The submitted post should have syntax highlighting.

What needs to be done:

  • Call typeof hljs !== 'undefined' && hljs.initHighlighting() in CommentPost's config method, but only if the post's contentHtml hasn't changed since the last redraw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants