-
Notifications
You must be signed in to change notification settings - Fork 413
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
Implement custom code block renderers support #3320
Conversation
@@ -48,6 +48,7 @@ public class DokkaBase : DokkaPlugin() { | |||
public val externalLocationProviderFactory: ExtensionPoint<ExternalLocationProviderFactory> by extensionPoint() | |||
public val outputWriter: ExtensionPoint<OutputWriter> by extensionPoint() | |||
public val htmlPreprocessors: ExtensionPoint<PageTransformer> by extensionPoint() | |||
public val htmlCodeBlockRenderers: ExtensionPoint<HtmlCodeBlockRenderer> by extensionPoint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put KDoc here as this is an extension point for plugins?
plugins/base/src/main/kotlin/renderers/html/HtmlCodeBlockRenderer.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I only have a minor comment above about code
and a documentation/api nitpick, but it's up to you
...plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/HtmlCodeBlockRenderer.kt
Outdated
Show resolved
Hide resolved
* remove `code` from HtmlCodeBlockRenderer.isApplicable * add documentation for extension * add test for multiline code with linebreaks * revert default rendering to original implementation
* split applicability for defined and undefined languages * make language nullable * improve documentation for applicability and building of content * add a lot of tests for multiple renderers combinations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done with the comments!
Fixes #3244
Notes:
language
andcode
properties are provided instead of fullContentCodeBlock
typeExample of usage in mermaid plugin: whyoleg/dokka-mermaid@0c0cd23