选择题答案显示不了公式的问题

dev_ec
hjm 5 years ago
parent 1a2de9b995
commit 1d2097611b

@ -79,7 +79,6 @@
"react-url-query": "^1.4.0",
"redux": "^4.0.0",
"redux-thunk": "2.3.0",
"showdown": "^1.8.6",
"store": "^2.0.12",
"style-loader": "0.19.0",
"styled-components": "^4.1.3",

@ -6,10 +6,8 @@ import { withStyles } from 'material-ui/styles';
import Table, { TableBody, TableCell, TableHead, TableRow } from 'material-ui/Table';
import Paper from 'material-ui/Paper';
import showdown from 'showdown'
const converter = new showdown.Converter()
// text = '# hello, markdown!',
// html = converter.makeHtml(text);
import { markdownToHTML } from 'educoder'
const styles = theme => ({
root: {
@ -34,7 +32,7 @@ const ChooseAnswerView = ({ gameAnswer, classes }) => {
return (
<div key={index} className="mb20">
<p>{index+1}</p>
<p dangerouslySetInnerHTML={{__html: converter.makeHtml(n.answer)}}></p>
<p dangerouslySetInnerHTML={{__html: markdownToHTML(n.answer)}}></p>
</div>
);
})}

Loading…
Cancel
Save