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

Provide offset/lengths for nodes #369

Open
DanTup opened this issue May 17, 2021 · 9 comments
Open

Provide offset/lengths for nodes #369

DanTup opened this issue May 17, 2021 · 9 comments

Comments

@DanTup
Copy link

DanTup commented May 17, 2021

There are some places in the analysis server that could benefit from parsing Markdown. For example Dart-Code/Dart-Code#3330 relates to code blocks no longer being highlighted in VS Code when Semantic Tokens are enabled (Semantic Tokens replace the old regex-based colouring, but the server doesn't produce highlights regions for the code blocks nested inside markdown).

Parsing the comments using this library produces code elements for the things I'd like to highlight, but it appears the offset/length are not provided on the nodes so it's not possible to produce a highlight region for that code.

If this seems like a reasonable extension, I'm happy to have a go at implementing it if someone is happy to provide pointers and/or reviews. Thanks!

@srawlins
Copy link
Member

This is in the works. I hope to land it this quarter (in the next 6 weeks). It involves a huge refactoring of how markdown is parsed; currently there is no Markdown source parse tree; only an output HTML AST.

@DanTup
Copy link
Author

DanTup commented May 17, 2021

Neat! I did wonder if the current AST might cause issues for non-HTML uses, so this sounds ideal. Thanks!

@frmatthew
Copy link

Any update on this issue? Thanks.

@srawlins
Copy link
Member

My teammate and I with whom I planned to work on this had a lot of non-overlapping vacation this summer, so I didn't get to land anything in June as I hoped. My new target is end of September. 🤞

@DanTup
Copy link
Author

DanTup commented Jan 18, 2022

@srawlins out of interest, is this still on your radar?

@srawlins
Copy link
Member

Oof, it is, but it keeps getting bumped by other slightly higher priority projects. :/ I should not announce a new target date.

@DanTup
Copy link
Author

DanTup commented Jan 18, 2022

lol, I know the feeling. It's not urgent to me, it's just useful to know if it may be on the way in the near-term or not :-) Thanks!

@Number-3434
Copy link

Number-3434 commented Jan 5, 2024

2024 - Any updates yet?

Concerning Issue #3648 - Comment References

I would really appreciate this, since this is the reason that documentation comment references cannot be parsed.

Since this is a pretty big bug, I think this issue deserves more attention.

For me, it is one of the only problems with the otherwise nearly-perfect Dart extension for VSCode.

Note

This works in JavaScript, maybe something could be copied over from that?

@srawlins
Copy link
Member

srawlins commented Jan 5, 2024

2024 - No updates.

I would appreciate it as well. Sorry, it has not made it to the top of our priorities.

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

No branches or pull requests

4 participants