~gpanders/wk

e52a0ef47baf8f3df9bcd1c2f5b343d7ef947697 — Gregory Anders 1 year, 3 months ago 1163d57
Strip surrounding whitespace from title
1 files changed, 2 insertions(+), 2 deletions(-)

M src/core.nim
M src/core.nim => src/core.nim +2 -2
@@ 32,8 32,8 @@ proc fromFile(fname: string): Option[Page] =
      break

    var matches: array[1, string]
    if line.match(re"^title: (.+)$", matches):
      title = matches[0]
    if line.match(re"^title: +(.+)$", matches):
      title = unicode.strip(matches[0])

    if line.match(re"^tags: (.+)$", matches):
      tags = split(matches[0], ",").mapIt(unicode.strip(it).toLower)