5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 23:16:22 +00:00

eliminar comillas del layout

This commit is contained in:
f 2020-12-14 12:20:39 -03:00
parent b113432032
commit 42d22458a0

View file

@ -19,7 +19,7 @@ class Post < OpenStruct
# TODO: Reemplazar cuando leamos el contenido del Document
# a demanda?
def find_layout(path)
IO.foreach(path).lazy.grep(/^layout: /).take(1).first&.split(' ')&.last&.to_sym
IO.foreach(path).lazy.grep(/^layout: /).take(1).first&.split(' ')&.last&.tr('\'', '')&.tr('"', '')&.to_sym
end
end