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

Five colons in a row causes crash (affects Asciidoctor.js, but the change has to happen to core) #1408

Closed
ainslec opened this issue Jul 10, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@ainslec
Copy link

ainslec commented Jul 10, 2015

Writing five colons in a row in AsciiDocFX crashes/hangs the program however @mojavelinux asked me to open the issue here as it is very likely due to an underlying bug in AsciiDoc core.

It seems like the regular expression for a dlist is matching differently in the JavaScript environment than it does in the Ruby environment.

Originally filed here :

asciidocfx/AsciidocFX#94

@mojavelinux
Copy link
Member

As mentioned in the AsciidocFX issue, Opal is turning do...while loops (written as begin...while in Ruby) into while loops. This, in turn, leads to an infinite loop in Asciidoctor.js.

The change to core is to avoid the use of the do...while loop and instead write it as a while loop. As it turns out, the code lends itself to this change already, so it's really not a problem and adds some clarity to the code at the same time.

@mojavelinux mojavelinux added this to the v1.5.3 milestone Jul 10, 2015
@mojavelinux mojavelinux self-assigned this Jul 10, 2015
@mojavelinux
Copy link
Member

Patching Asciidoctor.js is going to be kind of tricky in this case. I wonder if it would be better to do a 1.5.2.1 hot fix release. Or can we wait for Asciidoctor 1.5.3 (tentatively scheduled for the end of the month)?

@mojavelinux
Copy link
Member

I've sent a PR to core to switch the loop.

mojavelinux added a commit that referenced this issue Jul 12, 2015
resolves #1408 use while loop instead of begin...while loop
@mojavelinux mojavelinux removed the wip label Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants