5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 21:46:21 +00:00

Merge branch 'issue-13780' of https://0xacab.org/sutty/sutty into 17.3.alpine.panel.sutty.nl

This commit is contained in:
Sutty 2023-09-29 13:11:23 +00:00
commit e813fd6c0d

View file

@ -106,11 +106,14 @@ class Site
end
# Obtiene el idioma y la ruta del post a partir de la ubicación en
# el disco
# el disco.
#
# Las rutas vienen en ASCII-9BIT desde Rugged, pero en realidad
# son UTF-8
#
# @return [Array<String>]
def locale_and_path_from(path)
locale, path = path.split(File::SEPARATOR, 2)
locale, path = path.force_encoding('utf-8').split(File::SEPARATOR, 2)
[
locale.sub(LOCALE_FROM_PATH, ''),