diff options
author | sternenseemann <git@lukasepple.de> | 2020-05-13 20:18:40 +0200 |
---|---|---|
committer | sternenseemann <git@lukasepple.de> | 2020-05-13 21:32:20 +0200 |
commit | f08245c74a552148a3b39b3f846390c9d703ad07 (patch) | |
tree | f3f9c6e160bd6fab6ac9c76182840cb8f6661a74 | |
parent | 1c7aa765edf59b8441ec90770a8b93813ca5a1cf (diff) |
don't wrap text with <p> by default as default “markup”
This behavior can be reenabled using the --paragraph option.
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | src/logbook.ml | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md index 0daf00f..d8efc1d 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,9 @@ omitted. The default behavior is roughly equivalent to * `--file <path>` specify input `log` file. If omitted, use stdin. * `--markdown` enable markdown markup. +* `--paragraph` enables a trivial “markup” which just wraps the supplied text with `<p>`. + This is similar to what markdown does, so this option is intended to make templates + intended for markdown makeup work without a markup. * `--public` set privacy level to public * `--semi-private` set privacy level to semi private * `--private` set privacy level to private diff --git a/src/logbook.ml b/src/logbook.ml index e375462..da3f42e 100644 --- a/src/logbook.ml +++ b/src/logbook.ml @@ -32,7 +32,7 @@ let html_of_log log markup template privacy title = let input_file = ref None let privacy = ref Log.Public -let markup = ref (fun s -> Html.p (Html.string s)) +let markup = ref (fun s -> Html.string s) let title = ref "log" let template_file = ref None @@ -46,6 +46,7 @@ let arglist = "set privacy level of output to semi-private"); ("--markdown", Arg.Unit (fun () -> markup := Markdown.of_string), "enable markdown markup"); + ("--paragraph", Arg.Unit (fun () -> markup := (fun s -> Html.p (Html.string s))), "Wrap summary, item titles and texts with <p>, like for example markdown does, but without applying any markup"); ("--title", Arg.String (fun f -> title := f), "title of the generated html document"); ("--template", Arg.String (fun f -> template_file := Some f), "Jingoo template to use for HTML generation"); ] |