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

Fix crashes inside Markdown #368

Merged
merged 1 commit into from Dec 21, 2023
Merged

Conversation

susliko
Copy link
Collaborator

@susliko susliko commented Dec 21, 2023

Resolves #365

Problem

Parsing Markdown with nested Scala code using significant indentation crashes with SIGSEGV Example code:

for
  i <- 1 to 10
yield i

Solution

Stop calling lexer->get_column in scanner.c without prior eof-checks

Resolves tree-sitter#365
Problem
---
Parsing Markdown with nested Scala code using significant indentation crashes with SIGSEGV
Example code:
```scala
for
  i <- 1 to 10
yield i
```

Solution
---
Stop calling `lexer->get_column` in `scanner.c` without prior eof-checks
@susliko
Copy link
Collaborator Author

susliko commented Dec 21, 2023

Oh no, CI broke while was out of work for a few months

Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/node/18.18.2/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    import gyp  # noqa: E402
    ^^^^^^^^^^
  File "/Users/runner/hostedtoolcache/node/18.18.2/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    import gyp.input
  File "/Users/runner/hostedtoolcache/node/18.18.2/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'

Copy link
Collaborator

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit 866f945 into tree-sitter:master Dec 21, 2023
5 checks passed
@eed3si9n
Copy link
Collaborator

Oh no, CI broke while was out of work for a few months

I don't see that.

@susliko
Copy link
Collaborator Author

susliko commented Dec 22, 2023

I don't see that.

Restart helped :)

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

Successfully merging this pull request may close these issues.

nvim crashes with braceless "for" in Markdown
2 participants