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

Investigate support for more javadoc html tags #2262

Open
IgnatBeresnev opened this issue Dec 7, 2021 · 4 comments · Fixed by #2345
Open

Investigate support for more javadoc html tags #2262

IgnatBeresnev opened this issue Dec 7, 2021 · 4 comments · Fixed by #2345
Labels
enhancement An issue for a feature or an overall improvement format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general language: Java Issue/PR related to the Java language feature/analysis/docs

Comments

@IgnatBeresnev
Copy link
Member

At the moment, there's inconsistency and confusion when it comes to javadoc html tags support

There are basically 3 kinds of tags atm:

  • Those we support natively (we fully parse & custom render it)
  • Those we don't parse, but can render. For instance, tag <br> is not parsed and is therefore lost, but we have support for it internally (same implementation as for MarkdownTokenTypes.HARD_LINE_BREAK). Same for strikethrough. These should be simple fixes
  • Those we don't support at all. They and their children get lost and an empty text tag is returned.

Proposal:

  1. Investigate which tags already have render support (like br and strike) or where very little work is needed
  2. Create a list of tags that don't have any support, try to sort it in order of importance/frequency of use. Some of these should probably be implemented as separate issues.
  3. Investigate whether it's possible to render unsupported html tags the same way it's rendered for kotlin (through passing raw html text with a certain content type).
@IgnatBeresnev IgnatBeresnev added enhancement An issue for a feature or an overall improvement format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general labels Dec 7, 2021
@IgnatBeresnev
Copy link
Member Author

When/If adding support for <div> tag, write a test for

<dl>
    <div>
        <dt>Term1</dt>
        <dd>Desc2</dd>
    </div>
    <div>
        <dt>Term2</dt>
        <dd>Desc2</dd>
    </div>
</dl> 

At the moment it's impossible to do so because div is not supported and all its children are lost

@IgnatBeresnev
Copy link
Member Author

Just found out there's more missing javadoc tags in a similar (if not duplicate) issue planned for stable: #1618

@asfalcone
Copy link
Contributor

Please add support for header elements <h1> .. <h6>

@daymxn
Copy link

daymxn commented Nov 3, 2022

+1 to adding support for <br>

@IgnatBeresnev IgnatBeresnev added the language: Java Issue/PR related to the Java language feature/analysis/docs label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general language: Java Issue/PR related to the Java language feature/analysis/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants