aboutsummaryrefslogtreecommitdiffstats
path: root/FMark/src
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-03-23 01:17:05 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-03-23 01:17:05 +0000
commitaec5955e14eda3a5f2b41ad8e1ba1bc6f15a4ca3 (patch)
tree9cb70a0ebb402e40ae1eae3fb256850998828337 /FMark/src
parent92837363f3bfc23752b0bc2f4cfde13f0f48fcb9 (diff)
downloadFMark-aec5955e14eda3a5f2b41ad8e1ba1bc6f15a4ca3.tar.gz
FMark-aec5955e14eda3a5f2b41ad8e1ba1bc6f15a4ca3.zip
Removed warning and rebuilding js
Diffstat (limited to 'FMark/src')
-rw-r--r--FMark/src/Common/MarkdownGen/MarkdownGen.fs1
-rw-r--r--FMark/src/FMarkCLI/FMarkCLI.fs15
2 files changed, 9 insertions, 7 deletions
diff --git a/FMark/src/Common/MarkdownGen/MarkdownGen.fs b/FMark/src/Common/MarkdownGen/MarkdownGen.fs
index 89f0d86..8abf61c 100644
--- a/FMark/src/Common/MarkdownGen/MarkdownGen.fs
+++ b/FMark/src/Common/MarkdownGen/MarkdownGen.fs
@@ -39,7 +39,6 @@ and mdInlineElements' b eles =
| Picture (alt, url) -> (alt |> sbraSurround |> sprintf "!%s" ) + (url |> braSurround)
| InlineCitation (ht, _)
| InlineFootnote (ht, _) -> ("^" + mdFStr ht) |> sbraSurround
- | _ -> "not implemented in MarkdownGen"
List.fold convertMd (sprintf "%s" b) eles
and mdInlineElements = mdInlineElements' ""
diff --git a/FMark/src/FMarkCLI/FMarkCLI.fs b/FMark/src/FMarkCLI/FMarkCLI.fs
index 33bea73..667a720 100644
--- a/FMark/src/FMarkCLI/FMarkCLI.fs
+++ b/FMark/src/FMarkCLI/FMarkCLI.fs
@@ -27,20 +27,20 @@ with
| Test _ -> "run CI tests."
let ifFlagRunTests (r:ParseResults<CLIArguments>) =
- r.TryGetResult(Test) |> function
+ r.TryGetResult(Test) |> function
| Some(s) -> s |> function
- | Some(true) ->
+ | Some(true) ->
globLog.Info (Some 30) "Running tests sequentially."
Tests.runTestsInAssembly defaultConfig [|"--sequenced"|] |> setTestResult
- | _ ->
+ | _ ->
globLog.Info (Some 33) "Running tests in parallel."
Tests.runTestsInAssembly defaultConfig [||] |> setTestResult
| None(_) -> ()
r
let ifFileReadFrom (r:ParseResults<CLIArguments>) =
- r.TryGetResult(Input)
- |> function
+ r.TryGetResult(Input)
+ |> function
| Some(fname) -> Some(FileIO.readFilePath fname,fname)
| None(_) -> None
@@ -51,10 +51,12 @@ let setLoggerLevel (r:ParseResults<CLIArguments>)=
let welcomeMsg a =
globLog.Info None "Welcome to FMark!"
a
+
let logArgs (r:ParseResults<CLIArguments>) =
sprintf "Got parse results %A" <| r.GetAllResults()
|> globLog.Info None
r
+
let processCLI argv =
let errorHandler = ProcessExiter(colorizer = function ErrorCode.HelpText -> None | _ -> Some System.ConsoleColor.Red)
let parser = ArgumentParser.Create<CLIArguments>(programName = "FMark", errorHandler = errorHandler)
@@ -68,7 +70,7 @@ let processCLI argv =
|> ifFileReadFrom
|> function
| None(_) -> () // Do nothing
- | Some(instr,fname) ->
+ | Some(instr,fname) ->
let format = results.GetResult(Format,defaultValue = HTML) // Find out format and output file name, convert.
let defaultOutfile = if format=HTML then replaceChars "\.[a-zA-Z]+$" ".html" fname else replaceChars "\.[a-zA-Z]+$" "1.md" fname
let outFile = results.GetResult(Output,defaultValue=defaultOutfile)
@@ -76,6 +78,7 @@ let processCLI argv =
|> function
| Ok(s)
| Error(s) -> FileIO.writeToFile outFile s
+
[<EntryPoint>]
let main argv =
processCLI argv