Skip to content

Commit 5f7d1b0

Browse files
authored
Merge pull request #340 from mikepenz/develop
dev -> main
2 parents 05f3698 + ac5b6c3 commit 5f7d1b0

File tree

42 files changed

+372
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+372
-265
lines changed

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
</p>
88

99
<div align="center">
10-
<a href="https://github.com/mikepenz/multiplatform-markdown-renderer/actions">
10+
<a href="https://github.com/mikepenz/multiplatform-markdown-renderer/actions">
1111
<img src="https://github.com/mikepenz/multiplatform-markdown-renderer/workflows/CI/badge.svg"/>
1212
</a>
13+
<a href="https://central.sonatype.com/artifact/com.mikepenz/multiplatform-markdown-renderer">
14+
<img src="https://img.shields.io/maven-central/v/com.mikepenz/multiplatform-markdown-renderer?style=flat-square&color=%231B4897"/>
15+
</a>
1316
</div>
1417
<br />
1518

@@ -130,7 +133,10 @@ By default, the `MarkdownText` animates size changes (if images are loaded).
130133
Markdown(
131134
content,
132135
animations = markdownAnimations(
133-
animateTextSize = { this /** No animation */ }
136+
animateTextSize = {
137+
this
138+
/** No animation */
139+
}
134140
),
135141
}
136142
```
@@ -139,7 +145,7 @@ Markdown(
139145

140146
Starting with 0.16.0 the library includes support
141147
for [extended-spans](https://github.com/saket/extended-spans).
142-
> The library was integrated to make it multiplatform-compatible.
148+
> The library was integrated to make it multiplatform-compatible.
143149
> All credits for its functionality go to [Saket Narayan](https://github.com/saket).
144150

145151
It is not enabled by default, however you can enable it quickly by configuring the `extendedSpans`
@@ -266,7 +272,8 @@ Markdown(
266272

267273
### Table Support
268274

269-
Starting with 0.30.0, the library includes support for rendering tables in markdown. The `Markdown` composable will automatically handle table elements in your markdown content.
275+
Starting with 0.30.0, the library includes support for rendering tables in markdown. The `Markdown`
276+
composable will automatically handle table elements in your markdown content.
270277

271278
```kotlin
272279
val markdown = """
@@ -303,7 +310,8 @@ Markdown(
303310
```
304311

305312
> [!NOTE]
306-
> 0.21.0 adds JVM support for this dependency via `HTTPUrlConnection` -> however this is expected to be removed in the
313+
> 0.21.0 adds JVM support for this dependency via `HTTPUrlConnection` -> however this is expected to
314+
> be removed in the
307315
> future.
308316

309317
> [!NOTE]
@@ -330,14 +338,15 @@ Markdown(
330338

331339
The library (introduced with 0.27.0) offers optional support for syntax highlighting via
332340
the [Highlights](https://github.com/SnipMeDev/Highlights) project.
333-
This support is not included in the core, and can be enabled by adding the `multiplatform-markdown-renderer-code`
341+
This support is not included in the core, and can be enabled by adding the
342+
`multiplatform-markdown-renderer-code`
334343
dependency.
335344

336345
```groovy
337346
implementation("com.mikepenz:multiplatform-markdown-renderer-code:${version}")
338347
```
339348

340-
Once added, the `Markdown` has to be configured to use the alternative code highlighter.
349+
Once added, the `Markdown` has to be configured to use the alternative code highlighter.
341350

342351
```kotlin
343352
// Use default color scheme
@@ -357,8 +366,20 @@ val highlightsBuilder = remember(isDarkTheme) {
357366
Markdown(
358367
MARKDOWN,
359368
components = markdownComponents(
360-
codeBlock = { MarkdownHighlightedCodeBlock(it.content, it.node, highlightsBuilder) },
361-
codeFence = { MarkdownHighlightedCodeFence(it.content, it.node, highlightsBuilder) },
369+
codeBlock = {
370+
MarkdownHighlightedCodeBlock(
371+
content = it.content,
372+
node = it.node,
373+
highlights = highlightsBuilder
374+
)
375+
},
376+
codeFence = {
377+
MarkdownHighlightedCodeFence(
378+
content = it.content,
379+
node = it.node,
380+
highlights = highlightsBuilder
381+
)
382+
},
362383
)
363384
)
364385
```

app-desktop/src/jvmMain/kotlin/main.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ fun main() = application {
101101

102102
SelectionContainer {
103103
Markdown(
104-
MARKDOWN,
104+
content = MARKDOWN,
105105
components = markdownComponents(
106-
codeBlock = { MarkdownHighlightedCodeBlock(it.content, it.node, highlightsBuilder) },
107-
codeFence = { MarkdownHighlightedCodeFence(it.content, it.node, highlightsBuilder) },
106+
codeBlock = { MarkdownHighlightedCodeBlock(content = it.content, node = it.node, highlights = highlightsBuilder) },
107+
codeFence = { MarkdownHighlightedCodeFence(content = it.content, node = it.node, highlights = highlightsBuilder) },
108108
),
109109
imageTransformer = Coil3ImageTransformerImpl,
110110
extendedSpans = markdownExtendedSpans {
@@ -226,8 +226,8 @@ Title 1
226226
Title 2
227227
------
228228
229-
[https://mikepenz.dev](https://mikepenz.dev)
230-
[https://github.com/mikepenz](https://github.com/mikepenz)
231-
[Mike Penz's Blog](https://blog.mikepenz.dev/)
232-
<https://blog.mikepenz.dev/>
229+
[https://mikepenz.dev](https://mikepenz.dev)
230+
[https://github.com/mikepenz](https://github.com/mikepenz)
231+
[Mike Penz's Blog](https://blog.mikepenz.dev/)
232+
<https://blog.mikepenz.dev/>
233233
"""

app-wasm/src/wasmJsMain/kotlin/Main.kt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import androidx.compose.foundation.Image
21
import androidx.compose.foundation.layout.fillMaxSize
32
import androidx.compose.foundation.layout.padding
43
import androidx.compose.foundation.rememberScrollState
@@ -21,10 +20,6 @@ import androidx.compose.ui.graphics.Color
2120
import androidx.compose.ui.platform.LocalUriHandler
2221
import androidx.compose.ui.unit.dp
2322
import androidx.compose.ui.window.CanvasBasedWindow
24-
import coil3.compose.AsyncImage
25-
import coil3.compose.LocalPlatformContext
26-
import coil3.compose.rememberAsyncImagePainter
27-
import coil3.request.ImageRequest
2823
import com.mikepenz.aboutlibraries.Libs
2924
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
3025
import com.mikepenz.aboutlibraries.ui.compose.m3.LibraryDefaults
@@ -37,7 +32,6 @@ import com.mikepenz.markdown.compose.extendedspans.RoundedCornerSpanPainter
3732
import com.mikepenz.markdown.compose.extendedspans.SquigglyUnderlineSpanPainter
3833
import com.mikepenz.markdown.compose.extendedspans.rememberSquigglyUnderlineAnimator
3934
import com.mikepenz.markdown.m3.Markdown
40-
import com.mikepenz.markdown.model.ImageData
4135
import com.mikepenz.markdown.model.markdownExtendedSpans
4236
import org.jetbrains.compose.resources.ExperimentalResourceApi
4337

@@ -205,8 +199,8 @@ Title 1
205199
Title 2
206200
------
207201
208-
[https://mikepenz.dev](https://mikepenz.dev)
209-
[https://github.com/mikepenz](https://github.com/mikepenz)
210-
[Mike Penz's Blog](https://blog.mikepenz.dev/)
211-
<https://blog.mikepenz.dev/>
202+
[https://mikepenz.dev](https://mikepenz.dev)
203+
[https://github.com/mikepenz](https://github.com/mikepenz)
204+
[Mike Penz's Blog](https://blog.mikepenz.dev/)
205+
<https://blog.mikepenz.dev/>
212206
"""

app/src/main/kotlin/com/mikepenz/markdown/MainActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ Title 1
185185
Title 2
186186
------
187187
188-
[https://mikepenz.dev](https://mikepenz.dev)
189-
[https://github.com/mikepenz](https://github.com/mikepenz)
190-
[Mike Penz's Blog](https://blog.mikepenz.dev/)
191-
<https://blog.mikepenz.dev/>
188+
[https://mikepenz.dev](https://mikepenz.dev)
189+
[https://github.com/mikepenz](https://github.com/mikepenz)
190+
[Mike Penz's Blog](https://blog.mikepenz.dev/)
191+
<https://blog.mikepenz.dev/>
192192
"""

app/src/screenshotTest/kotlin/com/mikepenz/markdown/ui/m2/SnapshotTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ Title 1
129129
Title 2
130130
------
131131
132-
[https://mikepenz.dev](https://mikepenz.dev)
133-
[https://github.com/mikepenz](https://github.com/mikepenz)
134-
[Mike Penz's Blog](https://blog.mikepenz.dev/)
135-
<https://blog.mikepenz.dev/>
132+
[https://mikepenz.dev](https://mikepenz.dev)
133+
[https://github.com/mikepenz](https://github.com/mikepenz)
134+
[Mike Penz's Blog](https://blog.mikepenz.dev/)
135+
<https://blog.mikepenz.dev/>
136136
""".trimIndent()
137137

138138

app/src/screenshotTest/kotlin/com/mikepenz/markdown/ui/m3/SnapshotTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ Title 1
129129
Title 2
130130
------
131131
132-
[https://mikepenz.dev](https://mikepenz.dev)
133-
[https://github.com/mikepenz](https://github.com/mikepenz)
134-
[Mike Penz's Blog](https://blog.mikepenz.dev/)
135-
<https://blog.mikepenz.dev/>
132+
[https://mikepenz.dev](https://mikepenz.dev)
133+
[https://github.com/mikepenz](https://github.com/mikepenz)
134+
[Mike Penz's Blog](https://blog.mikepenz.dev/)
135+
<https://blog.mikepenz.dev/>
136136
""".trimIndent()
137137

138138

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maven stuff
22
GROUP=com.mikepenz
3-
VERSION_NAME=0.31.0
4-
VERSION_CODE=3100
3+
VERSION_NAME=0.32.0
4+
VERSION_CODE=3200
55
#
66
POM_URL=https://github.com/mikepenz/multiplatform-markdown-renderer
77
POM_SCM_URL=https://github.com/mikepenz/multiplatform-markdown-renderer

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versions]
2-
androidx-activityCompose = "1.10.0"
2+
androidx-activityCompose = "1.10.1"
33
androidx-material = "1.12.0"
44
coil = "3.1.0"
55
coil2 = "2.7.0"
66
markdown = "0.7.3"
7-
ktor = "3.1.0"
7+
ktor = "3.1.1"
88
highlights = "1.0.0"
99

1010
[libraries]

gradle/wrapper/gradle-wrapper.jar

122 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)