remove compact-ligo-ide import and implementation
This commit is contained in:
parent
19866476d7
commit
eb098d12e3
@ -29,7 +29,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/plugin-sitemap": "^2.0.0-alpha.37",
|
||||
"@ligo/syntax": "file:src/@ligo/syntax",
|
||||
"@ligolang/compact-ligo-ide": "^3.0.3"
|
||||
"@ligo/syntax": "file:src/@ligo/syntax"
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import Highlight, { defaultProps } from 'prism-react-renderer';
|
||||
import { CompactLigoIde } from '@ligolang/compact-ligo-ide';
|
||||
|
||||
const { Prism } = require("prism-react-renderer");
|
||||
|
||||
@ -140,21 +139,6 @@ export default ({ children, className: languageClassName, metastring }) => {
|
||||
};
|
||||
}, [button.current, target.current]);
|
||||
|
||||
// Compact Ligo IDE support - begin
|
||||
if (languageClassName === 'language-compactLigoIde') {
|
||||
const theme = isDarkTheme ? 'dark' : 'light';
|
||||
const webIdeUrlRegex = /webIdeUrl=(.*)/;
|
||||
|
||||
if (metastring && webIdeUrlRegex.test(metastring)) {
|
||||
const webIdeUrl = metastring.match(webIdeUrlRegex)[1];
|
||||
|
||||
return <CompactLigoIde webIdeUrl={webIdeUrl} theme={theme}>{children}</CompactLigoIde>
|
||||
}
|
||||
|
||||
return <CompactLigoIde theme={theme}>{children}</CompactLigoIde>
|
||||
}
|
||||
// Compact Ligo IDE support -- end
|
||||
|
||||
let language =
|
||||
languageClassName && languageClassName.replace(/language-/, '');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user