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

Extraneous <p> tags are added causing invalid HTML #1458

Closed
SUPERCILEX opened this issue Sep 10, 2020 · 4 comments · Fixed by #1473
Closed

Extraneous <p> tags are added causing invalid HTML #1458

SUPERCILEX opened this issue Sep 10, 2020 · 4 comments · Fixed by #1473
Assignees

Comments

@SUPERCILEX
Copy link
Contributor

/**
 * Sentence 1.
 *
 * Sentence 2.
 */
class Foo

In the Dokka DocTag model, this will be generated as P[P[Sentence 1], P[Sentence 2]] which is invalid HTML. The extraneous outer paragraph should be removed.

@BarkingBad BarkingBad self-assigned this Sep 11, 2020
@SUPERCILEX
Copy link
Contributor Author

SUPERCILEX commented Sep 11, 2020

I think I know what's going on. There's no "do nothing" DocTag, so when we get a Description Tag wrapper which only supports a single root DocTag, the assumption was that things could just be grouped together with a <p> tag.

Solutions:

  • Use divs instead (not a fan)
  • Create a new RootGroup DocTag that isn't intended to be rendered. Or rather, it gives developers the choice of what to render.

@BarkingBad
Copy link
Contributor

Hey, tell me whether do you encounter any problems with rendered output. I know DocTags have nested paragraphs, but we deal with them during construction of ContentNodes. I can intorduce top-level RootDocTag for sake of corectness with Html spec, however, DocTags don't represent actual HTML tree

@BarkingBad
Copy link
Contributor

00c7b47

will this new node satisfy you @SUPERCILEX ? Or you are thinking on something different?

@BarkingBad BarkingBad linked a pull request Sep 14, 2020 that will close this issue
@SUPERCILEX
Copy link
Contributor Author

That would be perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@SUPERCILEX @BarkingBad and others