Skip to content

Commit

Permalink
Fix Markdown extension-gfm-alerts dependencies, document it
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r committed Feb 15, 2024
1 parent 1d84518 commit b73f72b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions markdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ Not supported, and not on the roadmap:
* 3D STL models (GitHub Flavored Markdown)
* Rich rendering of embeds such as videos, YouTube, GitHub Gists/...

## Add the Markdown renderer to your project

You need to add the renderer **alongside** either a `jewel-standalone` or `jewel-ide-laf-bridge-*` dependency in order
for the renderer to work, as it assumes that the necessary `jewel-ui` and `jewel-foundation` are on the classpath
already.

If you want to use extensions, you also need to add them **alongside** the `jewel-markdown-core`:

```kotlin
dependencies {
implementation(libs.jewel.standalone)
implementation(libs.jewel.markdown.core)
implementation(libs.jewel.markdown.extension.gfm.alerts) // Optional
// Et cetera...
}
```

## How to use Jewel's Markdown renderer

The process that leads to rendering Markdown in a native UI is two-pass.
Expand Down
5 changes: 3 additions & 2 deletions markdown/extension-gfm-alerts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ plugins {
}

dependencies {
// This extension should get all dependencies from ui and markdown-core
compileOnly(projects.ui)
compileOnly(projects.markdown.core)

implementation(libs.commonmark.core)
compileOnly(libs.commonmark.core)

testImplementation(compose.desktop.uiTestJUnit4)
}
Expand Down

0 comments on commit b73f72b

Please sign in to comment.