Skip to content

Commit

Permalink
fix(ObjectViewer): support table
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxielun committed May 27, 2022
1 parent ed255ad commit 0f0eeb6
Show file tree
Hide file tree
Showing 3 changed files with 641 additions and 127 deletions.
3 changes: 2 additions & 1 deletion www/view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
"react-dev-utils": "^11.0.3",
"react-dom": "^17.0.2",
"react-intl": "^5.20.6",
"react-markdown": "^6.0.2",
"react-markdown": "^8.0.3",
"react-redux": "^7.2.4",
"react-refresh": "^0.8.3",
"react-router-dom": "^5.2.0",
"react-syntax-highlighter": "^15.4.4",
"remark-gfm": "^3.0.1",
"resolve": "1.18.1",
"resolve-url-loader": "^3.1.2",
"sass-loader": "^10.0.5",
Expand Down
3 changes: 2 additions & 1 deletion www/view/src/components/unit/ObjectViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { plFile, plCodeFile, plCopy } from '@pgyer/icons'
import SquareIconButton from 'APPSRC/components/unit/SquareIconButton'

import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import CodeViewer from 'APPSRC/components/unit/CodeViewer'
import Constants from 'APPSRC/config/Constants'

Expand Down Expand Up @@ -217,7 +218,7 @@ class ObjectViewer extends React.Component {
</Grid>
<Grid item xs={12} className={[mdSourceShow ? classes.height0 : classes.markdown, 'markdown-body'].join(' ')}>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css' />
<ReactMarkdown children={object.object.raw} />
<ReactMarkdown children={object.object.raw} remarkPlugins={[remarkGfm]} />
</Grid>
</Grid>
}
Expand Down
Loading

1 comment on commit 0f0eeb6

@cubicwork
Copy link
Contributor

@cubicwork cubicwork commented on 0f0eeb6 Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix #89

Please sign in to comment.