Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Unfinished inline citation (?? something) hangs the script #31

Open
hazzik opened this issue Oct 16, 2017 · 8 comments
Open

Unfinished inline citation (?? something) hangs the script #31

hazzik opened this issue Oct 16, 2017 · 8 comments

Comments

@hazzik
Copy link

hazzik commented Oct 16, 2017

No description provided.

@FokkeZB
Copy link
Owner

FokkeZB commented Oct 17, 2017

Could you provide an example?

@hazzik
Copy link
Author

hazzik commented Oct 17, 2017 via email

@FokkeZB
Copy link
Owner

FokkeZB commented Oct 17, 2017

Sorry, can't reproduce hanging the script:

@hazzik
Copy link
Author

hazzik commented Oct 17, 2017

I'm able to reproduce this constantly. Thee are several conditions:

  • ?? shall be at the beginning of a line
  • It shall be not at the end of the file
    ezgif-3-255a5087d6 1

@hazzik
Copy link
Author

hazzik commented Oct 17, 2017

Easiest way to reproduce is

  1. Open http://j2m.fokkezb.nl/
  2. On line 15 select "citation??" (without first ??")
  3. Press "delete"/"backspace"

@hazzik
Copy link
Author

hazzik commented Oct 17, 2017

I can constantly reproduce this in latest Chrome and Firefox on Windows 10 and MacOS and on node 8.7
It does not hang in Safari and Mobile Safari

@FokkeZB
Copy link
Owner

FokkeZB commented Oct 17, 2017

Yep, with that I can reproduce, so it seems the issue is related to other stuff in the editor as well.

Unfortunately it indeed hangs, with no logs to aid debugging it further.

I'm also kind of iceboxing this project. If you have time to dig in and send a PR that would be appreciated.

@hazzik
Copy link
Author

hazzik commented Oct 17, 2017

The culprit is at regex which parses the citation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants