Skip to content

Commit

Permalink
Update ParseScript.fs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetricek committed Nov 8, 2013
1 parent 19c9598 commit 91d85e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FSharp.Literate/ParseScript.fs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module internal ParseScript =
transformBlocks acc defs blocks
// Unknown command
| BlockCommand(cmds)::_ ->
failwith "Unknown commands: %A" [for (KeyValue(k, v)) in cmds -> sprintf "%s:%s" k v]
failwithf "Unknown command: %A" [for (KeyValue(k, v)) in cmds -> sprintf "%s:%s" k v]

// Skip snippets with no content
| BlockSnippet([])::blocks ->
Expand Down Expand Up @@ -157,4 +157,4 @@ module internal ParseScript =
let (Snippet(_, lines)) = match sourceSnippets with [| it |] -> it | _ -> failwith "multiple snippets"
let parsedBlocks = parseScriptFile lines
let paragraphs, defs = transformBlocks [] [] (List.ofSeq parsedBlocks)
LiterateDocument(paragraphs, "", defs, LiterateSource.Script sourceSnippets, errors)
LiterateDocument(paragraphs, "", defs, LiterateSource.Script sourceSnippets, errors)

0 comments on commit 91d85e3

Please sign in to comment.