-
Notifications
You must be signed in to change notification settings - Fork 26
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
Coil3 isnt quite working #327
base: main
Are you sure you want to change the base?
Conversation
@@ -12,6 +12,8 @@ Additional supported Markdown, via extensions: | |||
|
|||
* Alerts ([GitHub Flavored Markdown][alerts-specs]) — see [`extension-gfm-alerts`](extension-gfm-alerts) | |||
|
|||
Im**agetime, and no guarantees are made for binary and source compatibility. It might also have bugs and missing features. ![here is an image](https://hellorse.fr/images/p/media/image/products/product_76409_2b3beddbf246765581c5e91a9fd6.webp?p=product_thumbnail&type=product) And ot**her stuff time, and no guarantees are made for binary and source compatibility. It might also have bugs and missing features. time, and no guarantees are made for binary and source compatibility. It might also have bugs and missing features. |
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.
This change looks wrong
@@ -144,7 +151,7 @@ public class MarkdownProcessor(private val extensions: List<MarkdownProcessorExt | |||
private fun Image.toMarkdownImageOrNull(): MarkdownBlock.Image? { | |||
if (destination.isBlank()) return null | |||
|
|||
return MarkdownBlock.Image(destination.trim(), title.trim()) | |||
return MarkdownBlock.Image(destination.trim(), (title?:"").trim()) |
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.
return MarkdownBlock.Image(destination.trim(), (title?:"").trim()) | |
return MarkdownBlock.Image(destination.trim(), title.orEmpty().trim()) |
implementation("io.coil-kt.coil3:coil-compose:3.0.0-alpha06") | ||
// Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core' | ||
// https://github.com/coil-kt/coil/issues/842#issuecomment-1975115060 | ||
runtimeOnly("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.1-Beta") |
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.
This will break in the IDE, we can't bring coroutine dependencies in. We need to use those that the platform has.
is Paragraph -> toMarkdownParagraphOrNull() | ||
is Paragraph -> { | ||
val child = firstChild | ||
if (child is Image && child === lastChild) { |
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.
@rock3r Could this be written better? (does "===" operator be error prone?)
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.
The ===
check makes the is
check pointless I suppose — but I haven't checked the code too thoroughly yet, since Oleg said it's not really working anyway. I'm not sure why we need a ref equality check here.
No description provided.