-
Notifications
You must be signed in to change notification settings - Fork 81
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
Update handling of end-of-line single-line comments #825
Conversation
Fix for scalameta#321, scalameta#605. Solution: distinguish between leading trivia a) previous trailing trivia, b) current leading trivia, c) a footer in case of last statement.
outdated
|
Use None instead of Some in order to avoid a Some value, which would otherwise be printed differently accross the test matrix.
updated the test to avoid the difference in the printing of values I think the remaining failures are spurious, seemingly related to a race or lock:
May I request a re-run of the failed jobs? But first, Eggnog! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
Looks like the Scala 3 test is failing, you might need to adjust depending on the scala version, there should be some samples in the tests. Let me know if you need help figuring it out.
This strategy was overlooked, but is preferred since it reuses known machinery, and seems to introduce less complexity for the same behavior. Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
Aha, much better, thanks not sure about error on Windows, but doesn't seem related to these changes:
maybe spurious:
happy to update as requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Fix for #321, #605 🎄🎁
Hello,
It's really fun slowly discovering all that mdoc can do. However, I finally ran into the comment duplication issue (for me, import statements). Following the threads from previous comments (in the issues linked above), I propose the changes in this PR:
Render.renderEvaluatedSection
method to more explicitly handle these types of commentsWhat other strategies did I consider but reject?
stats
andRange.Position
systems: my (possibly incorrect) impression is that the root cause is the lack of comments in quasiquotes, and, since adding them is out of scope, that therefore some workarounds are requiredHappy to make changes as needed, and thanks for your consideration.