Closed SanchithHegde closed 3 years ago
@SanchithHegde I've already found the cause of the 'stack level too deep' error and fixed that. The input R(alpha_(K+1)|x)
also revealed a parsing error. Still working on fixing that.
@pepijnve That's great! Thank you!
Found that simple things like ceil(-2.5)
, floor(-oo)
give the same error, where abs(-2.5)
works.
I applied the patch manually in the local gem and it fixed it.
I've logged #64 to track the |
parsing issue. I'll make a patch release containing the bugfix for the infinite recursion already.
First of all, I'm new to the ruby ecosystem so I'm sorry if the fix for this issue is trivial or if I should have reported this issue elsewhere. If that is indeed the case, please let me know which repo I should be filing this issue under and I'll happily do so.
Steps to reproduce
Contents of
test.adoc
file (the actual expressions that caused the issue are slightly more complex, these are just the minimal expressions with which I could reproduce it):asciidoctor-pdf
invocationExpected result
The expression gets parsed and rendered without issues.
Actual result
asciidoctor-pdf
fails with "stack level too deep".Trace
``` Traceback (most recent call last): 9775: from /home/username/.asdf/installs/ruby/2.7.3/bin/asciidoctor-pdf:23:in `Remarks
Each of the expressions can independently cause the issue.
With the first one, I won't get the error if the expression is either:
alpha_(K+1)|x
(adding parentheses around the expression throws the error), orR(alpha_(K)|x)
(adding any operator after K throws the error).Similar results with the second one,
(y) ^ (1-x)
andx ((y) ^ (x))
don't throw any errors.I was also able to reproduce this issue with the docker-asciidoctor container if that's of any help.
If there's any more information required from my end, I'll gladly provide.