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