Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on some complex wiki pages #51

Open
jywarren opened this issue Mar 5, 2019 · 2 comments · May be fixed by #52
Open

Error on some complex wiki pages #51

jywarren opened this issue Mar 5, 2019 · 2 comments · May be fixed by #52

Comments

@jywarren
Copy link
Member

jywarren commented Mar 5, 2019

I'm seeing this now working on https://publiclab.org/wiki/pi-builder?raw=true which is GREAT after #49 and publiclab/plots2#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.

@jywarren
Copy link
Member Author

jywarren commented Mar 5, 2019

Wow, it's a HUGE table, maybe a worst-case scenario 😂

https://gist.github.com/jywarren/c7331b6e7a2796b141eb0c2f31e90ebb

@jywarren
Copy link
Member Author

jywarren commented Mar 5, 2019

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

@jywarren jywarren linked a pull request Mar 5, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants