spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.75k stars 38.16k forks source link

Code snippet rendering issue in reference documentation #33760

Closed bohni closed 1 month ago

bohni commented 1 month ago

https://github.com/spring-projects/spring-framework/blob/ac5c8adb9830939e2329f1e16727c522a172c7c8/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-requestmapping.adoc?plain=1#L122

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.

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

bclozel commented 1 month ago

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: https://github.com/spring-projects/spring-framework/blob/ac5c8adb9830939e2329f1e16727c522a172c7c8/framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-requestmapping.adoc?plain=1#L122

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:

Steps to Fix

Torres-09 commented 1 month ago

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

bclozel commented 1 month ago

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

bclozel commented 1 month ago

Superseded by #33766