From 6b11ca6c1dc2a81abb17e85204f708f1ad68dec9 Mon Sep 17 00:00:00 2001
From: August Skare <post@augustskare.no>
Date: Tue, 30 Oct 2018 09:05:52 +0100
Subject: fix code highlighting with ...

---
 packages/dev-tools-pages/ts/components/Code.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'packages/dev-tools-pages/ts/components/Code.tsx')

diff --git a/packages/dev-tools-pages/ts/components/Code.tsx b/packages/dev-tools-pages/ts/components/Code.tsx
index a6971fc84..6675422ef 100644
--- a/packages/dev-tools-pages/ts/components/Code.tsx
+++ b/packages/dev-tools-pages/ts/components/Code.tsx
@@ -18,6 +18,7 @@ interface CodeProps {
     gutter?: Array<number>;
     gutterLength?: number;
     copy?: boolean;
+    etc?: boolean;
 }
 
 interface CodeState {
@@ -134,15 +135,16 @@ class Code extends React.Component<CodeProps, CodeState> {
     }
 
     async componentDidMount() {
-        const { language, children, diff, gutter } = this.props;
+        const { language, children, diff, gutter, etc } = this.props;
 
         const code = children as string;
 
         if (language !== undefined) {
+            /* console.log(code); */
             const { default: highlight } = await System.import(/* webpackChunkName: 'highlightjs' */ 'ts/highlight');
 
             this.setState({
-                hlCode: highlight(language, code, diff, gutter),
+                hlCode: highlight({ language, code, diff, gutter, etc }),
             });
         }
     }
@@ -174,6 +176,8 @@ class Code extends React.Component<CodeProps, CodeState> {
             Code = StyledCodeDiff as any;
         }
 
+        /* console.log(hlCode); */
+
         return (
             <Container>
                 <Base language={language} diff={diff} light={light}>
-- 
cgit v1.2.3

