-
Notifications
You must be signed in to change notification settings - Fork 395
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: use tree-sitter-markdown to extract code snippets #1315
Conversation
Once this PR is merged, does this issue to some extent no longer exist? |
Which issue do you mean? your link seems to be a PR instead of an issue. PS. I just found some bugs in current implementation, please wait a sec. |
I'm a little bit lost in current test framework, I'll leave the task of adding test cases to you if you don't mind. |
@yetone I saw your fix in #1318, theoretically it avoids creating nonsense folders/files. But I still believe tree-sitter based parsing is a more robust way, as it provides a "best guess" when the code block wrappers are not properly matched. Do you want me to make a similar change to |
That would be better! |
I've aligned my code to your change, but that change seems to cause new problems for me with planning turned on (another story). Basically I think I'm done, with And I've tested on my cached malformed response, it works well no matter planning mode is on or off. |
Could you please elaborate on this issue? |
Never mind, it's fixed by your later commits. |
Fixes #1288 .
Please review the code with care, and feel free to change it.
I somehow feel there're other unnecessary codes if we choose to implement like this, but I'll leave you to judge.
TODO: new test cases