[Gekidou] commonmark feature parity (#6303)

* Initial attempt at search highlighting for Markdown

* Remove fonts from highlighted text so that it can be bolded

* Add initial task list support

* Render markdown checkbox

* Switch to Commonmark fork

* Use searchPatterns prop

* searchPatterns prop at post level

* Update app/components/markdown/transform.ts

Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
This commit is contained in:
Elias Nahum
2022-05-27 14:30:34 -04:00
committed by GitHub
parent efeab53d0b
commit 4ab7a6baa6
11 changed files with 234 additions and 88 deletions

79
package-lock.json generated
View File

@@ -34,8 +34,8 @@
"@sentry/react-native": "3.4.2",
"@stream-io/flat-list-mvcp": "0.10.2",
"base-64": "1.0.0",
"commonmark": "github:mattermost/commonmark.js#d1003be97d15414af6c21894125623c45e3f5096",
"commonmark-react-renderer": "github:mattermost/commonmark-react-renderer#4e52e1725c0ef5b1e2ecfe9883220ec36c2eb67d",
"commonmark": "npm:@mattermost/commonmark@0.30.1-0",
"commonmark-react-renderer": "github:mattermost/commonmark-react-renderer#2c660491041f7595f6ce5a05f6dc2e30ca769d3a",
"deep-equal": "2.0.5",
"deepmerge": "4.2.2",
"emoji-regex": "10.1.0",
@@ -4021,6 +4021,37 @@
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@mattermost/commonmark": {
"version": "0.30.1-0",
"resolved": "https://registry.npmjs.org/@mattermost/commonmark/-/commonmark-0.30.1-0.tgz",
"integrity": "sha512-0+qW22COfd/BA81TQ05nQMfhmnuRAkv/vwCbs3iFVTEj7mTunYRwWUyb5M8K849V2VXdLdrS8htsBtIHDb2H7g==",
"peer": true,
"dependencies": {
"entities": "~3.0.1",
"mdurl": "~1.0.1",
"minimist": "~1.2.5",
"string.prototype.repeat": "^1.0.0",
"xregexp": "5.1.0"
},
"bin": {
"commonmark": "bin/commonmark"
},
"engines": {
"node": "*"
}
},
"node_modules/@mattermost/commonmark/node_modules/entities": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
"peer": true,
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/@mattermost/compass-icons": {
"version": "0.1.23",
"resolved": "https://registry.npmjs.org/@mattermost/compass-icons/-/compass-icons-0.1.23.tgz",
@@ -9441,9 +9472,10 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"node_modules/commonmark": {
"version": "0.30.0",
"resolved": "git+ssh://git@github.com/mattermost/commonmark.js.git#d1003be97d15414af6c21894125623c45e3f5096",
"license": "BSD-2-Clause",
"name": "@mattermost/commonmark",
"version": "0.30.1-0",
"resolved": "https://registry.npmjs.org/@mattermost/commonmark/-/commonmark-0.30.1-0.tgz",
"integrity": "sha512-0+qW22COfd/BA81TQ05nQMfhmnuRAkv/vwCbs3iFVTEj7mTunYRwWUyb5M8K849V2VXdLdrS8htsBtIHDb2H7g==",
"dependencies": {
"entities": "~3.0.1",
"mdurl": "~1.0.1",
@@ -9460,7 +9492,9 @@
},
"node_modules/commonmark-react-renderer": {
"version": "4.3.5",
"resolved": "git+ssh://git@github.com/mattermost/commonmark-react-renderer.git#4e52e1725c0ef5b1e2ecfe9883220ec36c2eb67d",
"resolved": "git+ssh://git@github.com/mattermost/commonmark-react-renderer.git#2c660491041f7595f6ce5a05f6dc2e30ca769d3a",
"integrity": "sha512-D++d6UFNLyu4fAAZg6blRb3rkiG+bFWKJ8fSLOJwzBit3Hm/sPZbx2QQeKfx+IHoMg7cCvHlesAT1+kB/+kBLQ==",
"license": "MIT",
"dependencies": {
"lodash.assign": "^4.2.0",
"lodash.isplainobject": "^4.0.6",
@@ -9468,7 +9502,7 @@
"xss-filters": "^1.2.6"
},
"peerDependencies": {
"commonmark": "^0.30.0",
"@mattermost/commonmark": "*",
"react": ">=0.14.0"
}
},
@@ -28684,6 +28718,27 @@
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"@mattermost/commonmark": {
"version": "0.30.1-0",
"resolved": "https://registry.npmjs.org/@mattermost/commonmark/-/commonmark-0.30.1-0.tgz",
"integrity": "sha512-0+qW22COfd/BA81TQ05nQMfhmnuRAkv/vwCbs3iFVTEj7mTunYRwWUyb5M8K849V2VXdLdrS8htsBtIHDb2H7g==",
"peer": true,
"requires": {
"entities": "~3.0.1",
"mdurl": "~1.0.1",
"minimist": "~1.2.5",
"string.prototype.repeat": "^1.0.0",
"xregexp": "5.1.0"
},
"dependencies": {
"entities": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
"peer": true
}
}
},
"@mattermost/compass-icons": {
"version": "0.1.23",
"resolved": "https://registry.npmjs.org/@mattermost/compass-icons/-/compass-icons-0.1.23.tgz",
@@ -32868,8 +32923,9 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"commonmark": {
"version": "git+ssh://git@github.com/mattermost/commonmark.js.git#d1003be97d15414af6c21894125623c45e3f5096",
"from": "commonmark@github:mattermost/commonmark.js#d1003be97d15414af6c21894125623c45e3f5096",
"version": "npm:@mattermost/commonmark@0.30.1-0",
"resolved": "https://registry.npmjs.org/@mattermost/commonmark/-/commonmark-0.30.1-0.tgz",
"integrity": "sha512-0+qW22COfd/BA81TQ05nQMfhmnuRAkv/vwCbs3iFVTEj7mTunYRwWUyb5M8K849V2VXdLdrS8htsBtIHDb2H7g==",
"requires": {
"entities": "~3.0.1",
"mdurl": "~1.0.1",
@@ -32886,8 +32942,9 @@
}
},
"commonmark-react-renderer": {
"version": "git+ssh://git@github.com/mattermost/commonmark-react-renderer.git#4e52e1725c0ef5b1e2ecfe9883220ec36c2eb67d",
"from": "commonmark-react-renderer@github:mattermost/commonmark-react-renderer#4e52e1725c0ef5b1e2ecfe9883220ec36c2eb67d",
"version": "git+ssh://git@github.com/mattermost/commonmark-react-renderer.git#2c660491041f7595f6ce5a05f6dc2e30ca769d3a",
"integrity": "sha512-D++d6UFNLyu4fAAZg6blRb3rkiG+bFWKJ8fSLOJwzBit3Hm/sPZbx2QQeKfx+IHoMg7cCvHlesAT1+kB/+kBLQ==",
"from": "commonmark-react-renderer@github:mattermost/commonmark-react-renderer#2c660491041f7595f6ce5a05f6dc2e30ca769d3a",
"requires": {
"lodash.assign": "^4.2.0",
"lodash.isplainobject": "^4.0.6",