Skip to content

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Apr 21, 2023

Fixes Issue 23849 - Ddoc $(LPAREN) and $(RPAREN) not formatted properly

Introduced by #6391 in 2018.

Fixes Issue 23849 - Ddoc $(LPAREN) and $(RPAREN) not formatted properly

Introduced by dlang#6391 in 2018.
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
23849 enhancement Ddoc $(LPAREN) and $(RPAREN) not formatted properly

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8739"

@ntrel ntrel marked this pull request as draft April 21, 2023 14:48
@ntrel
Copy link
Contributor Author

ntrel commented Apr 21, 2023

Some of these changes are wrong with the current ddoc - I thought macros weren't expanded inside backticks, and they aren't for the filed issue. It seems in some cases they are expanded. The spec doesn't seem clear on the behaviour:
https://dlang.org/spec/ddoc.html#inline_code

Text inside these sections will be escaped according to the rules described above

@ntrel
Copy link
Contributor Author

ntrel commented Apr 21, 2023

@adamdruppe:

Backticks can not contain embedded HTML (and are not supposed to contain macros, the way I intended it, but the implementation didn't keep to that intention)

#5183 (comment)

Is it intended for macro expansion to always happen inside backticks?

@ntrel
Copy link
Contributor Author

ntrel commented Apr 21, 2023

Ah I see what the problem is, ddoc actually always expands macros but ddox doesn't for the issue code.

@ntrel ntrel closed this Apr 21, 2023
@ntrel
Copy link
Contributor Author

ntrel commented Apr 21, 2023

Filed dlang/ddox#241.

ntrel added a commit to ntrel/dlang.org that referenced this pull request Apr 22, 2023
ntrel added a commit to ntrel/dlang.org that referenced this pull request Apr 22, 2023
dkorpel pushed a commit to dlang/dlang.org that referenced this pull request Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants