Fix image names
This commit is contained in:
parent
da6ba9ab01
commit
683f46435f
@ -76,7 +76,7 @@ internal suspend fun SpaceClient.processMarkdownDocument(path: Path) = coroutine
|
||||
val newText = documentBody.replace(regex) {
|
||||
val id = it.groups["id"]?.value ?: error("Unexpected reference format: ${it.value}")
|
||||
val alt = it.groups["alt"]?.value
|
||||
val imageName = alt ?: id
|
||||
val imageName = alt?.let { "$id-$alt" } ?: id
|
||||
logger.info("Downloading image $id as images/$imageName")
|
||||
launch(Dispatchers.IO) {
|
||||
extractImage(path.parent, id, imageName)
|
||||
|
Loading…
Reference in New Issue
Block a user