Syntax highlighting?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
There is a library for syntax highlighting on the web page — SyntaxHighlighter ( Blocks of text on the page (by default, the tag pre) rastsvechivaya when the page is initialized.

Problem: after the text in the block has changed, for example, as a result of operation Ajax, he loses the coloring. How to ask the library to re-process a block?


after working SyntaxHighlighter pre tags are replaced by others, posed by the editor (div, which is nested table, and so on). Again, my script writes the text in a pre tag.

P. S. in Other words, how to get the module to colorize a code block on the page that appeared after the module to your work?
by | 5 views

1 Answer

0 like 0 dislike
In the second version I used for this
SyntaxHighlighter.highlight(0, node)

Where node — pre or unhighlighted.
110,608 questions
257,186 answers
27,213 users