translate _ to space in pathToLabel
This commit is contained in:
parent
ace57a50f9
commit
8b25a3d712
1 changed files with 2 additions and 2 deletions
|
@ -272,8 +272,8 @@ unlabelledImage' label' y = asStr y <|> asObj y
|
|||
warning <- m .:? "warning"
|
||||
let label = fromMaybe (pathToLabel path) label'
|
||||
pure $ Image {label, path, download, nsfw, warning}
|
||||
pathToLabel = Text.pack . dashToSpace . takeBaseName
|
||||
dashToSpace = map \case '-' -> ' '; c -> c
|
||||
pathToLabel = Text.pack . gapToSpace . takeBaseName
|
||||
gapToSpace = map \case '-' -> ' '; '_' -> ' '; c -> c
|
||||
|
||||
instance FromYAML Link where
|
||||
parseYAML =
|
||||
|
|
Loading…
Reference in a new issue