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

Webhelp #1723

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Webhelp #1723

wants to merge 10 commits into from

Conversation

MarcinAman
Copy link
Contributor

No description provided.

/**
* We need to choose something different than `index` since webhelp overrides it
*/
override val PAGE_WITH_CHILDREN_SUFFIX: String = "webhelp_index"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe parent ?

}
}.let { content ->
"""<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE product-profile
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd extract this <!DOCTYPE> header (or possibly all hardcoded xmls) to some separate file(s) and load it there (as well as in the ProjectDefinitionAppender)

Comment on lines +23 to +31
override val preprocessors: List<PageTransformer> =
listOf(RootCreator, TableOfContentPreprocessor(), ProjectDefinitionAppender, ConfigurationAppender)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an extension

Comment on lines +43 to +79
code {
attributes["style"] = "block"
attributes["lang"] = "kotlin"
val renderer = WebhelpCodeRenderer(dokkaContext)
+node.children.joinToString(separator = "") { renderer.buildContentNode(it, pageContext) }
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can reuse the tags/code here. Moreover, I'd make this a preprocessor, converting groups with ContentKind.Symbol to ContentCode

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 this pull request may close these issues.

2 participants