(zettel (meta (back "00001006000000 00001006020000 00001006031500 00001007701000 00001007702000 00001012053200 00001012054200") (backward "00001006000000 00001006020000 00001006031500 00001007701000 00001007702000 00001012053200 00001012054200") (box-number "1") (created "20210126175322") (modified "20240219193158") (published "20240219193158") (role "manual") (syntax "zmk") (tags "#manual #syntax #zettelstore") (title "Syntax of Metadata")) (rights 4) (encoding "") (content "The metadata of a zettel is a collection of key-value pairs.\nThe syntax roughly resembles the internal header of an email ([[RFC5322|https://tools.ietf.org/html/rfc5322]]).\n\nThe key is a sequence of alphanumeric characters, a hyphen-minus character (\"\"''-''\"\", U+002D) is also allowed.\nIt begins at the first position of a new line.\nUppercase letters of a key are translated to their lowercase equivalence.\n\nA key is separated from its value either by\n* a colon character (\"\"'':''\"\"),\n* a non-empty sequence of space characters,\n* a sequence of space characters, followed by a colon, followed by a sequence of space characters.\n\nA value is a sequence of printable characters.\nIf the value should be continued in the following line, that following line (\"\"continuation line\"\") must begin with a non-empty sequence of space characters.\nThe rest of the following line will be interpreted as the next part of the value.\nThere can be more than one continuation line for a value.\n\nA non-continuation line that contains a possibly empty sequence of characters, followed by the percent sign character (\"\"''%''\"\") is treated as a comment line.\nIt will be ignored.\n\nParsing metadata ends, if an empty line is found or if a line with at least three hyphen-minus characters is found.\n\nSome examples:\n\n```meta\ntitle1:The Title\n title-2 : Another title\ntitle-3: A wrapped\n title\ntitle-4: A\n wrapped\n title\n with\n more\n than\n one\n continuation\n line\n% A comment line\n % Another comment line.\n\nNo metadata anymore, because of the empty line.\n```"))