Skip to content

Code snippet rendering issue in reference documentation #33760

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

Closed
bohni opened this issue Oct 21, 2024 · 4 comments
Closed

Code snippet rendering issue in reference documentation #33760

bohni opened this issue Oct 21, 2024 · 4 comments
Assignees
Labels
status: superseded An issue that has been superseded by another type: documentation A documentation task

Comments

@bohni
Copy link

bohni commented Oct 21, 2024

* `+"/projects/{project:[a-z]+}/versions"+` - match and capture a variable with a regex

This line in the docs is not rendered correctly.
In this case passthrough should be marked with double plus signs, because the plus sign of the regex is interpreted as the end of the inline passthrough.

  • ++"/projects/{project:[a-z]+}/versions"++

double plus ist documented on https://docs.asciidoctor.org/asciidoc/latest/pass/pass-macro/

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 21, 2024
@bclozel bclozel added status: ideal-for-contribution An issue that a contributor can help us with type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 21, 2024
@bclozel bclozel added this to the 6.1.15 milestone Oct 21, 2024
@bclozel bclozel changed the title Asciidoc rendering broken Code snippet rendering issue in reference documentation Oct 21, 2024
@bclozel
Copy link
Member

bclozel commented Oct 21, 2024

I'm turning this issue into an ideal-for-contribution issue. This means it is well suited for first time contributors and we can help you ship your first Spring or open source contribution. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software.

If you have had a pull request merged before, consider leaving this one for someone new. Thanks!

Problem

@bohni pointed out that our reference documentation in this section does not render the mapping pattern as it should. Instead of reading "/projects/{project:[a-z]+}/versions" we are seeing "/projects/{project:[a-z]}/versions"+

Solution

As pointed out in the same comment, changing this line:

* `+"/projects/{project:[a-z]+}/versions"+` - match and capture a variable with a regex

to ++"/projects/{project:[a-z]+}/versions"++ should fix the rendering problem.

You can change this line locally and then check that the documentation renders properly by:

  • running ./gradlew antora
  • then opening the framework-docs/build/site/6.1-SNAPSHOT/web/webmvc/mvc-controller/ann-requestmapping.html file in your browser

Steps to Fix

  • Claim this issue with a comment below and ask any clarifying questions you need
  • Set up a repository locally following the contributing and building from source docs. NOTE: you should check out the 6.1.x and submit the PR against it, we will merge the change forward in 6.2 when applying your contribution.
  • Try to fix the issue following the steps above
  • Commit your changes and start a pull request.

@Torres-09
Copy link
Contributor

Hi! If this issue is still open, I would like to work on it. Thanks!

@bclozel
Copy link
Member

bclozel commented Oct 21, 2024

I've assigned the issue to you @Torres-09 !

@bclozel
Copy link
Member

bclozel commented Oct 21, 2024

Superseded by #33766

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
@bclozel bclozel removed this from the 6.1.15 milestone Oct 21, 2024
@bclozel bclozel added status: superseded An issue that has been superseded by another and removed status: ideal-for-contribution An issue that a contributor can help us with labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants