Fixes #257: use regex to detect : at the end instead of substring(nchar())

When YAML contains multibyte chars, nchar() does not work if `front_matter`'s encoding is unknown