aboutsummaryrefslogtreecommitdiffstats
path: root/webui
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-23 02:26:03 +0200
committerGitHub <noreply@github.com>2019-05-23 02:26:03 +0200
commitf20708ad36f9953dc76c21116de712850948b1ed (patch)
tree1ff27a74146d6395cd125c9ab2d0adce932b5b97 /webui
parent8c263465fbd956f2964bb7cd911b5ea5e8d5a50e (diff)
parent356d1b412c2671d0e430339f42a0d479e11347fd (diff)
downloadgit-bug-f20708ad36f9953dc76c21116de712850948b1ed.tar.gz
Merge pull request #150 from MichaelMure/sandhose/webui/markdown
webui: Render markdown in messages
Diffstat (limited to 'webui')
-rw-r--r--webui/package-lock.json352
-rw-r--r--webui/package.json6
-rw-r--r--webui/src/Content.js15
-rw-r--r--webui/src/bug/Message.js8
4 files changed, 368 insertions, 13 deletions
diff --git a/webui/package-lock.json b/webui/package-lock.json
index fc2bc0b2..72207193 100644
--- a/webui/package-lock.json
+++ b/webui/package-lock.json
@@ -854,6 +854,14 @@
"resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.7.1.tgz",
"integrity": "sha512-OYpa/Sg+2GDX+jibUfpZVn1YqSVRpYmTLF2eyAfrFTIJSbwyIrc+YscayoykvaOME/wV4BV0Sa0yqdMrgse6mA=="
},
+ "@mapbox/hast-util-table-cell-style": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@mapbox/hast-util-table-cell-style/-/hast-util-table-cell-style-0.1.3.tgz",
+ "integrity": "sha512-QsEsh5YaDvHoMQ2YHdvZy2iDnU3GgKVBTcHf6cILyoWDZtPSdlG444pL/ioPYO/GpXSfODBb9sefEetfC4v9oA==",
+ "requires": {
+ "unist-util-visit": "^1.3.0"
+ }
+ },
"@material-ui/core": {
"version": "3.9.3",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.9.3.tgz",
@@ -1088,9 +1096,9 @@
}
},
"@types/node": {
- "version": "11.12.2",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-11.12.2.tgz",
- "integrity": "sha512-c82MtnqWB/CqqK7/zit74Ob8H1dBdV7bK+BcErwtXbe0+nUGkgzq5NTDmRW/pAv2lFtmeNmW95b0zK2hxpeklg=="
+ "version": "12.0.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
+ "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA=="
},
"@types/prop-types": {
"version": "15.7.0",
@@ -2560,9 +2568,9 @@
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"bail": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz",
- "integrity": "sha512-1X8CnjFVQ+a+KW36uBNMTU5s8+v5FzeqrP7hTG5aTb4aPreSbZJlhwPon9VKMuEVgV++JM+SQrALY3kr7eswdg=="
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz",
+ "integrity": "sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww=="
},
"balanced-match": {
"version": "1.0.0",
@@ -3056,6 +3064,26 @@
"resolved": "https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz",
"integrity": "sha1-6LL+PX8at9aaMhma/5HqaTFAlRU="
},
+ "character-entities": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz",
+ "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w=="
+ },
+ "character-entities-html4": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.3.tgz",
+ "integrity": "sha512-SwnyZ7jQBCRHELk9zf2CN5AnGEc2nA+uKMZLHvcqhpPprjkYhiLn0DywMHgN5ttFZuITMATbh68M6VIVKwJbcg=="
+ },
+ "character-entities-legacy": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz",
+ "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww=="
+ },
+ "character-reference-invalid": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz",
+ "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg=="
+ },
"chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
@@ -3797,6 +3825,11 @@
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
+ "collapse-white-space": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz",
+ "integrity": "sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ=="
+ },
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -4146,6 +4179,24 @@
"randomfill": "^1.0.3"
}
},
+ "css": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
+ "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "source-map": "^0.6.1",
+ "source-map-resolve": "^0.5.2",
+ "urix": "^0.1.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ }
+ }
+ },
"css-blank-pseudo": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz",
@@ -4814,6 +4865,14 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
+ "detab": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.2.tgz",
+ "integrity": "sha512-Q57yPrxScy816TTE1P/uLRXLDKjXhvYTbfxS/e6lPD+YrqghbsMlGB9nQzj/zVtSPaF0DFPSdO916EWO4sQUyQ==",
+ "requires": {
+ "repeat-string": "^1.5.4"
+ }
+ },
"detect-indent": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
@@ -7561,6 +7620,19 @@
"minimalistic-assert": "^1.0.1"
}
},
+ "hast-to-hyperscript": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-6.0.0.tgz",
+ "integrity": "sha512-QnJbXddVGNJ5v3KegK1MY6luTkNDBcJnCQZcekt7AkES2z4tYy85pbFUXx7Mb0iXZBKfwoVdgfxU12GbmlwbbQ==",
+ "requires": {
+ "comma-separated-tokens": "^1.0.0",
+ "property-information": "^5.0.0",
+ "space-separated-tokens": "^1.0.0",
+ "style-to-object": "^0.2.1",
+ "unist-util-is": "^2.0.0",
+ "web-namespaces": "^1.1.2"
+ }
+ },
"hast-util-from-parse5": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.0.tgz",
@@ -7573,11 +7645,46 @@
"xtend": "^4.0.1"
}
},
+ "hast-util-is-element": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.0.2.tgz",
+ "integrity": "sha512-4MEtyofNi3ZunPFrp9NpTQdNPN24xvLX3M+Lr/RGgPX6TLi+wR4/DqeoyQ7lwWcfUp4aevdt4RR0r7ZQPFbHxw=="
+ },
"hast-util-parse-selector": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.1.tgz",
"integrity": "sha512-Xyh0v+nHmQvrOqop2Jqd8gOdyQtE8sIP9IQf7mlVDqp924W4w/8Liuguk2L2qei9hARnQSG2m+wAOCxM7npJVw=="
},
+ "hast-util-sanitize": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-1.3.0.tgz",
+ "integrity": "sha512-rQeetoD08jHmDOUYN6h9vTuE0hQN4wymhtkQZ6whHtcjaLpjw5RYAbcdxx9cMgMWERDsSs79UpqHuBLlUHKeOw==",
+ "requires": {
+ "xtend": "^4.0.1"
+ }
+ },
+ "hast-util-to-html": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-5.0.0.tgz",
+ "integrity": "sha512-vYbSEixfYD3CIqd1rN1Q4T0z0Tyodht0jNst940ESz9g7eaFc0FJADMkdVvlHqDsXVok0vji8FukrBfAH91BWQ==",
+ "requires": {
+ "ccount": "^1.0.0",
+ "comma-separated-tokens": "^1.0.1",
+ "hast-util-is-element": "^1.0.0",
+ "hast-util-whitespace": "^1.0.0",
+ "html-void-elements": "^1.0.0",
+ "property-information": "^5.0.0",
+ "space-separated-tokens": "^1.0.0",
+ "stringify-entities": "^1.0.1",
+ "unist-util-is": "^2.0.0",
+ "xtend": "^4.0.1"
+ }
+ },
+ "hast-util-whitespace": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.2.tgz",
+ "integrity": "sha512-4JT8B0HKPHBMFZdDQzexjxwhKx9TrpV/+uelvmqlPu8RqqDrnNIEHDtDZCmgE+4YmcFAtKVPLmnY3dQGRaN53A=="
+ },
"hastscript": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/hastscript/-/hastscript-5.0.0.tgz",
@@ -7743,6 +7850,11 @@
}
}
},
+ "html-void-elements": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.4.tgz",
+ "integrity": "sha512-yMk3naGPLrfvUV9TdDbuYXngh/TpHbA6TrOw3HL9kS8yhwx7i309BReNg7CbAJXGE+UMJ6je5OqJ7lC63o6YuQ=="
+ },
"html-webpack-plugin": {
"version": "4.0.0-alpha.2",
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-alpha.2.tgz",
@@ -8333,6 +8445,20 @@
"kind-of": "^3.0.2"
}
},
+ "is-alphabetical": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.3.tgz",
+ "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA=="
+ },
+ "is-alphanumerical": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz",
+ "integrity": "sha512-A1IGAPO5AW9vSh7omxIlOGwIqEvpW/TA+DksVOPM5ODuxKlZS09+TEM1E3275lJqO2oJ38vDpeAL3DCIiHE6eA==",
+ "requires": {
+ "is-alphabetical": "^1.0.0",
+ "is-decimal": "^1.0.0"
+ }
+ },
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
@@ -8390,6 +8516,11 @@
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
},
+ "is-decimal": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz",
+ "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ=="
+ },
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
@@ -8461,6 +8592,11 @@
"is-extglob": "^1.0.0"
}
},
+ "is-hexadecimal": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz",
+ "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA=="
+ },
"is-in-browser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz",
@@ -8582,11 +8718,21 @@
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
+ "is-whitespace-character": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz",
+ "integrity": "sha512-SNPgMLz9JzPccD3nPctcj8sZlX9DAMJSKH8bP7Z6bohCwuNgX8xbWr1eTAYXX9Vpi/aSn8Y1akL9WgM3t43YNQ=="
+ },
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
},
+ "is-word-character": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.3.tgz",
+ "integrity": "sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A=="
+ },
"is-wsl": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
@@ -9846,6 +9992,11 @@
"object-visit": "^1.0.0"
}
},
+ "markdown-escapes": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz",
+ "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw=="
+ },
"math-random": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz",
@@ -9861,11 +10012,42 @@
"safe-buffer": "^5.1.2"
}
},
+ "mdast-util-definitions": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-1.2.3.tgz",
+ "integrity": "sha512-P6wpRO8YVQ1iv30maMc93NLh7COvufglBE8/ldcOyYmk5EbfF0YeqlLgtqP/FOBU501Kqar1x5wYWwB3Nga74g==",
+ "requires": {
+ "unist-util-visit": "^1.0.0"
+ }
+ },
+ "mdast-util-to-hast": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-4.0.0.tgz",
+ "integrity": "sha512-yOTZSxR1aPvWRUxVeLaLZ1sCYrK87x2Wusp1bDM/Ao2jETBhYUKITI3nHvgy+HkZW54HuCAhHnS0mTcbECD5Ig==",
+ "requires": {
+ "collapse-white-space": "^1.0.0",
+ "detab": "^2.0.0",
+ "mdast-util-definitions": "^1.2.0",
+ "mdurl": "^1.0.1",
+ "trim": "0.0.1",
+ "trim-lines": "^1.0.0",
+ "unist-builder": "^1.0.1",
+ "unist-util-generated": "^1.1.0",
+ "unist-util-position": "^3.0.0",
+ "unist-util-visit": "^1.1.0",
+ "xtend": "^4.0.1"
+ }
+ },
"mdn-data": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz",
"integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA=="
},
+ "mdurl": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
+ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4="
+ },
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -10771,6 +10953,19 @@
"safe-buffer": "^5.1.1"
}
},
+ "parse-entities": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz",
+ "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==",
+ "requires": {
+ "character-entities": "^1.0.0",
+ "character-entities-legacy": "^1.0.0",
+ "character-reference-invalid": "^1.0.0",
+ "is-alphanumerical": "^1.0.0",
+ "is-decimal": "^1.0.0",
+ "is-hexadecimal": "^1.0.0"
+ }
+ },
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
@@ -14330,6 +14525,50 @@
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
},
+ "remark-html": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-9.0.0.tgz",
+ "integrity": "sha512-dIO+tZj7XIBqz2UngJ57sGrtbM0dVvruD/R/lk/JQC5U0dSmCNO1liC1H2Cz537rT19EDmdbLxjIaYW2L7ctiQ==",
+ "requires": {
+ "hast-util-sanitize": "^1.0.0",
+ "hast-util-to-html": "^5.0.0",
+ "mdast-util-to-hast": "^4.0.0",
+ "xtend": "^4.0.1"
+ }
+ },
+ "remark-parse": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz",
+ "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==",
+ "requires": {
+ "collapse-white-space": "^1.0.2",
+ "is-alphabetical": "^1.0.0",
+ "is-decimal": "^1.0.0",
+ "is-whitespace-character": "^1.0.0",
+ "is-word-character": "^1.0.0",
+ "markdown-escapes": "^1.0.0",
+ "parse-entities": "^1.1.0",
+ "repeat-string": "^1.5.4",
+ "state-toggle": "^1.0.0",
+ "trim": "0.0.1",
+ "trim-trailing-lines": "^1.0.0",
+ "unherit": "^1.0.4",
+ "unist-util-remove-position": "^1.0.0",
+ "vfile-location": "^2.0.0",
+ "xtend": "^4.0.1"
+ }
+ },
+ "remark-react": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/remark-react/-/remark-react-5.0.1.tgz",
+ "integrity": "sha512-yHv5WIh47srKfdm794UMIHjNLr6EY2YCzsqvdJ/qvN1Tq1jgyg3q8Zo9pJc4L7BwZOMTia6O2JgrJeOsJfowzA==",
+ "requires": {
+ "@mapbox/hast-util-table-cell-style": "^0.1.3",
+ "hast-to-hyperscript": "^6.0.0",
+ "hast-util-sanitize": "^1.0.0",
+ "mdast-util-to-hast": "^4.0.0"
+ }
+ },
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -15494,6 +15733,11 @@
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz",
"integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA=="
},
+ "state-toggle": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz",
+ "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw=="
+ },
"static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@@ -15672,6 +15916,17 @@
"safe-buffer": "~5.1.0"
}
},
+ "stringify-entities": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",
+ "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==",
+ "requires": {
+ "character-entities-html4": "^1.0.0",
+ "character-entities-legacy": "^1.0.0",
+ "is-alphanumerical": "^1.0.0",
+ "is-hexadecimal": "^1.0.0"
+ }
+ },
"stringify-object": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
@@ -15726,6 +15981,14 @@
"schema-utils": "^1.0.0"
}
},
+ "style-to-object": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.2.2.tgz",
+ "integrity": "sha512-GcbtvfsqyKmIPpHeOHZ5Rmwsx2MDJct4W9apmTGcbPTbpA2FcgTFl2Z43Hm4Qb61MWGPNK8Chki7ITiY7lLOow==",
+ "requires": {
+ "css": "2.2.4"
+ }
+ },
"stylehacks": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
@@ -16083,15 +16346,25 @@
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
"integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0="
},
+ "trim-lines": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-1.1.2.tgz",
+ "integrity": "sha512-3GOuyNeTqk3FAqc3jOJtw7FTjYl94XBR5aD9QnDbK/T4CA9sW/J0l9RoaRPE9wyPP7NF331qnHnvJFBJ+IDkmQ=="
+ },
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
+ "trim-trailing-lines": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz",
+ "integrity": "sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q=="
+ },
"trough": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.3.tgz",
- "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw=="
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.4.tgz",
+ "integrity": "sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q=="
},
"tryer": {
"version": "1.0.1",
@@ -16177,6 +16450,15 @@
}
}
},
+ "unherit": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.2.tgz",
+ "integrity": "sha512-W3tMnpaMG7ZY6xe/moK04U9fBhi6wEiCYHUW5Mop/wQHf12+79EQGwxYejNdhEz2mkqkBlGwm7pxmgBKMVUj0w==",
+ "requires": {
+ "inherits": "^2.0.1",
+ "xtend": "^4.0.1"
+ }
+ },
"unicode-canonical-property-names-ecmascript": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
@@ -16274,11 +16556,58 @@
"imurmurhash": "^0.1.4"
}
},
+ "unist-builder": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-1.0.4.tgz",
+ "integrity": "sha512-v6xbUPP7ILrT15fHGrNyHc1Xda8H3xVhP7/HAIotHOhVPjH5dCXA097C3Rry1Q2O+HbOLCao4hfPB+EYEjHgVg==",
+ "requires": {
+ "object-assign": "^4.1.0"
+ }
+ },
+ "unist-util-generated": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.4.tgz",
+ "integrity": "sha512-SA7Sys3h3X4AlVnxHdvN/qYdr4R38HzihoEVY2Q2BZu8NHWDnw5OGcC/tXWjQfd4iG+M6qRFNIRGqJmp2ez4Ww=="
+ },
+ "unist-util-is": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-2.1.3.tgz",
+ "integrity": "sha512-4WbQX2iwfr/+PfM4U3zd2VNXY+dWtZsN1fLnWEi2QQXA4qyDYAZcDMfXUX0Cu6XZUHHAO9q4nyxxLT4Awk1qUA=="
+ },
+ "unist-util-position": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.0.3.tgz",
+ "integrity": "sha512-28EpCBYFvnMeq9y/4w6pbnFmCUfzlsc41NJui5c51hOFjBA1fejcwc+5W4z2+0ECVbScG3dURS3JTVqwenzqZw=="
+ },
+ "unist-util-remove-position": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz",
+ "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==",
+ "requires": {
+ "unist-util-visit": "^1.1.0"
+ }
+ },
"unist-util-stringify-position": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz",
"integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ=="
},
+ "unist-util-visit": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
+ "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
+ "requires": {
+ "unist-util-visit-parents": "^2.0.0"
+ }
+ },
+ "unist-util-visit-parents": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.0.tgz",
+ "integrity": "sha512-j0XZY3063E6v7qhx4+Q2Z0r8SMrLX7Mr6DabiCy67zMEcFQYtpNOplLlEK1KKEBEs9S+xB5U+yloQxbSwF9P/g==",
+ "requires": {
+ "unist-util-is": "^2.1.2"
+ }
+ },
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@@ -16480,6 +16809,11 @@
"vfile-message": "^1.0.0"
}
},
+ "vfile-location": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.4.tgz",
+ "integrity": "sha512-KRL5uXQPoUKu+NGvQVL4XLORw45W62v4U4gxJ3vRlDfI9QsT4ZN1PNXn/zQpKUulqGDpYuT0XDfp5q9O87/y/w=="
+ },
"vfile-message": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz",
diff --git a/webui/package.json b/webui/package.json
index f3138a49..db2eb34b 100644
--- a/webui/package.json
+++ b/webui/package.json
@@ -14,7 +14,11 @@
"react-dom": "^16.8.6",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
- "react-scripts": "^2.1.8"
+ "react-scripts": "^2.1.8",
+ "remark-html": "^9.0.0",
+ "remark-parse": "^6.0.3",
+ "remark-react": "^5.0.1",
+ "unified": "^7.1.0"
},
"devDependencies": {
"eslint-config-prettier": "^4.3.0",
diff --git a/webui/src/Content.js b/webui/src/Content.js
new file mode 100644
index 00000000..19f57631
--- /dev/null
+++ b/webui/src/Content.js
@@ -0,0 +1,15 @@
+import unified from 'unified';
+import parse from 'remark-parse';
+import html from 'remark-html';
+import remark2react from 'remark-react';
+
+const Content = ({ markdown }) => {
+ const processor = unified()
+ .use(parse)
+ .use(html)
+ .use(remark2react);
+
+ return processor.processSync(markdown).contents;
+};
+
+export default Content;
diff --git a/webui/src/bug/Message.js b/webui/src/bug/Message.js
index 8a6cac09..64498135 100644
--- a/webui/src/bug/Message.js
+++ b/webui/src/bug/Message.js
@@ -5,6 +5,7 @@ import React from 'react';
import Author from '../Author';
import { Avatar } from '../Author';
import Date from '../Date';
+import Content from '../Content';
const useStyles = makeStyles(theme => ({
author: {
@@ -41,8 +42,7 @@ const useStyles = makeStyles(theme => ({
},
body: {
...theme.typography.body1,
- padding: '1rem',
- whiteSpace: 'pre-wrap',
+ padding: '0 1rem',
},
}));
@@ -60,7 +60,9 @@ function Message({ op }) {
</div>
{op.edited && <div className={classes.tag}>Edited</div>}
</header>
- <section className={classes.body}>{op.message}</section>
+ <section className={classes.body}>
+ <Content markdown={op.message} />
+ </section>
</Paper>
</article>
);