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

Javadoc <p> tags should only precede paragraphs #510

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/weaver_forge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ The resulting comment in JavaDoc format would be:
* incididunt ut labore et dolore magna aliqua.
* </ul>
* And an <strong>inline code snippet</strong>: {@code Attr.attr}.
* <p>
* <h1>Summary</h1>
* <h2>Examples</h2>
* <ol>
Expand All @@ -791,7 +790,6 @@ The resulting comment in JavaDoc format would be:
* Lorem ipsum dolor sit amet, consectetur adipiscing
* elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</blockquote>
*
* <p>
* <blockquote>
* [!NOTE] Something very important here</blockquote>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
* incididunt ut labore et dolore magna aliqua.
* </ul>
* And an <strong>inline code snippet</strong>: {@code Attr.attr}.
* <p>
* <h1>Summary</h1>
* <h2>Examples</h2>
* <ol>
Expand All @@ -110,7 +109,6 @@
* Lorem ipsum dolor sit amet, consectetur adipiscing
* elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</blockquote>
*
* <p>
* <blockquote>
* [!NOTE] Something very important here</blockquote>
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_forge/src/formats/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl<'source> HtmlRenderer<'source> {
) -> Result<(), Error> {
if ctx.add_old_style_paragraph {
ctx.pushln(indent)?;
if !matches!(md_node, Node::List(_)) {
if matches!(md_node, Node::Paragraph(_)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why I didn't think of this in #474

ctx.push_unbroken_ln("<p>", indent)?;
}
ctx.add_old_style_paragraph = false;
Expand Down
Loading