Changeset 3 in code for trunk/zs.go


Ignore:
Timestamp:
Dec 5, 2014, 5:09:10 PM (11 years ago)
Author:
zaitsev.serge
Message:

fixed empty header in markdown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zs.go

    r1 r3  
    3333func md(s string) (map[string]string, string) {
    3434        v := map[string]string{}
    35         // FIXME: if no header?
     35        if strings.Index(s, "\n\n") == -1 {
     36                return map[string]string{}, s
     37        }
    3638        header, body := split2(s, "\n\n")
    3739        for _, line := range strings.Split(header, "\n") {
Note: See TracChangeset for help on using the changeset viewer.