From 238f3c89a7cfc3c8d6941aac4e108c13f84c6647 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Wed, 7 Mar 2018 15:32:37 +0100
Subject: Make sure we apply the appropriate syntax highlighting depending on
 the language of the docs

---
 packages/react-docs/src/ts/components/method_block.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'packages/react-docs/src/ts/components/method_block.tsx')

diff --git a/packages/react-docs/src/ts/components/method_block.tsx b/packages/react-docs/src/ts/components/method_block.tsx
index 029662b3f..44a1db8af 100644
--- a/packages/react-docs/src/ts/components/method_block.tsx
+++ b/packages/react-docs/src/ts/components/method_block.tsx
@@ -4,6 +4,7 @@ import * as React from 'react';
 
 import { DocsInfo } from '../docs_info';
 import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptMethod } from '../types';
+import { constants } from '../utils/constants';
 import { typeDocUtils } from '../utils/typedoc_utils';
 
 import { Comment } from './comment';
@@ -70,7 +71,7 @@ export class MethodBlock extends React.Component<MethodBlockProps, MethodBlockSt
                         </div>
                     </div>
                 )}
-                <code className="hljs">
+                <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
                     <MethodSignature
                         method={method}
                         sectionName={this.props.sectionName}
-- 
cgit v1.2.3

