Correctly parsing tabbed code snippets from mdx

This commit is contained in:
Piotr Janosz
2019-07-09 15:23:07 +02:00
committed by fabioberger
parent f1f5b57254
commit ac3a6426e8
3 changed files with 4 additions and 9 deletions

View File

@@ -47,16 +47,16 @@ const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
## Code Tabs
<CodeTabs tabs={['typescript', 'python']}>
<CodeTabs tabs={['Typescript', 'Python']}>
```typescript canRun
```js canRun
/// @param salt Arbitrary number to ensure uniqueness of transaction hash.
/// @param signerAddress Address of transaction signer.
import { TruffleArtifactAdapter } from '@0x/sol-coverage';
const projectRoot = '.';
```
```python
```
import { TruffleArtifactAdapter } from '@0x/sol-coverage';
const projectRoot = '.';
const solcVersion = '0.5.0';

View File

@@ -4,7 +4,6 @@ import SyntaxHighlighter from 'react-syntax-highlighter';
import { Button } from 'ts/components/button';
import { CodeRun } from 'ts/components/docs/code_run';
import { Tab, TabList, TabPanel, Tabs } from 'ts/components/docs/tabs';
import { colors } from 'ts/style/colors';
import { styled } from 'ts/style/theme';

View File

@@ -15,7 +15,7 @@ import { InlineLink } from 'ts/components/docs/inline_link';
import { Notification } from 'ts/components/docs/notification';
import { SiteWrap } from 'ts/components/docs/siteWrap';
import { Table } from 'ts/components/docs/table';
import { CodeTabs, Tab, TabList, TabPanel, Tabs } from 'ts/components/docs/tabs';
import { CodeTabs } from 'ts/components/docs/tabs';
import { TutorialSteps } from 'ts/components/docs/tutorial_steps';
import { UnorderedList } from 'ts/components/docs/unordered_list';
import { DocumentTitle } from 'ts/components/document_title';
@@ -144,8 +144,4 @@ const mdxComponents = {
ul: UnorderedList,
Notification,
CodeTabs,
Tabs,
TabList,
Tab,
TabPanel,
};