Skip to content

Commit e035fdf

Browse files
karandeep-joharKarandeep Johar
andauthored
Disable highlighting to fix update bug (#26)
Co-authored-by: Karandeep Johar <kjohar@dropbox.com>
1 parent 97047ed commit e035fdf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/utils.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,15 @@ export class Highlight extends react.Component<HltProps, {}> {
622622
super(props);
623623
}
624624
defaultProps = {className: ""};
625-
componentDidMount = () => this.highlightCode();
626-
componentDidUpdate = () => this.highlightCode();
627625

628-
highlightCode = () => [].forEach.call(
629-
(<Element>reactDom.findDOMNode(this)).querySelectorAll('pre code'),
630-
(node: Node) => hljs.highlightBlock(node)
631-
);
626+
// TODO: fix this highlighting it breaks updates
627+
// componentDidMount = () => this.highlightCode();
628+
// componentDidUpdate = () => this.highlightCode();
629+
630+
// highlightCode = () => [].forEach.call(
631+
// (<Element>reactDom.findDOMNode(this)).querySelectorAll('pre code'),
632+
// (node: Node) => hljs.highlightBlock(node)
633+
// );
632634

633635
public render() {
634636
return react.createElement('pre', {className: this.props.className},

0 commit comments

Comments
 (0)