inline-markdown-editor
inline-markdown-editor copied to clipboard
Error on some complex wiki pages
I'm seeing this now working on https://publiclab.org/wiki/pi-builder?raw=true which is GREAT after #49 and https://github.com/publiclab/plots2/pull/4869.
But now I'm still seeing an error on this page: https://publiclab.org/wiki/gsoc?raw=true
It's due to inline grid content, although the pi-builder
page has this too, this page has tables with rows, and one is causing trouble:
application-ce898ad24395aacb043b807fa29328194b2659cef282f7b2b295a05d0845b1eb.js:54921 Uncaught SyntaxError: Invalid regular expression: /^\s*<div class="inline\-grid\-container">
<table class="table inline\-grid notes\-grid notes\-grid\-soc notes\-grid\-soc\-986">
<tbody><tr>
<th><a data\-type="title">Title<\/a><\/th>
<th><a data\-type="author">Author<\/a><\/th>
<th><a data\-type="updated">Updated<\/a><\/th>
<th><a data\-type="likes">Likes<\/a><\/th>
We should try putting the exact content into a test here.
Wow, it's a HUGE table, maybe a worst-case scenario 😂
https://gist.github.com/jywarren/c7331b6e7a2796b141eb0c2f31e90ebb
I think we really need to just use an HTML parser. I want to capture this with a test but it's a bit hard to do so in Jasmine; it's really a unit test.
https://www.npmjs.com/package/htmlparser