mirror of
https://github.com/lancatlin/mdsh.git
synced 2026-11-05 19:30:12 +08:00
feat: add inline and block runner. Improve execution error handling
This commit is contained in:
1 parent
8f764548b9
commit
a2c99c710e
6 files changed
+218
-63
No files matched your search
@@ -23,7 +23,7 @@ func parseDocument(doc string) (frontmatter string, body string, err error) {
|
||||
err = fmt.Errorf("Invalid document: frontmatter required.\n%s", doc)
|
||||
return
|
||||
}
|
||||
parts := strings.Split(doc, sep)
|
||||
parts := strings.SplitN(doc, sep, 3)
|
||||
if len(parts) < 3 {
|
||||
err = fmt.Errorf("Invalid document: frontmatter required.\n%s", doc)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user