fix: link hashtags (#720)

This commit is contained in:
Diego Beraldin 2024-04-24 20:27:22 +02:00 committed by GitHub
parent dc02ecef39
commit d31287fa10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 3 deletions

View File

@ -22,6 +22,7 @@ internal fun String.sanitize(): String = this
.spoilerFixUp()
.quoteFixUp()
.expandLemmyHandles()
.cleanupEscapes()
private fun String.removeEntities(): String =
replace("&", "&")
@ -92,3 +93,6 @@ private fun String.expandLemmyHandles(): String = let { content ->
}
}
}
private fun String.cleanupEscapes(): String =
replace("\\#", "#")

View File

@ -20,4 +20,4 @@ internal class DefaultExportSettingsUseCase(
val data = settings.toData()
jsonSerializationStrategy.encodeToString(data)
}
}
}

View File

@ -24,4 +24,3 @@ internal class DefaultImportSettingsUseCase(
settingsRepository.changeCurrentSettings(settings)
}
}

View File

@ -60,4 +60,4 @@ actual val fileSystemModule = module {
actual fun getFileSystemManager(): FileSystemManager {
val res by KoinJavaComponent.inject<FileSystemManager>(FileSystemManager::class.java)
return res
}
}