diff --git a/assets/template/reveal-markdown.tmpl b/assets/template/reveal-markdown.tmpl index cb1228b..6cce0d6 100644 --- a/assets/template/reveal-markdown.tmpl +++ b/assets/template/reveal-markdown.tmpl @@ -18,8 +18,8 @@
@@ -42,8 +42,8 @@ slideNumber: true, hash: true, transition: '{{ .Reveal.Transition }}', // none/fade/slide/convex/concave/zoom - navigationMode: '{{ .Reveal.NavigationMode }}', - showSlideNumber: '{{ .Reveal.SlideNumberVisibility }}', + navigationMode: {{ .Reveal.NavigationMode | trim | quote }}, + showSlideNumber: {{ .Reveal.SlideNumberVisibility | trim | quote }}, slideNumber: '{{ .Reveal.SlideNumberFormat }}', markdown: { smartypants: true, diff --git a/internal/app/rendering/const_other.go b/internal/app/rendering/const_other.go new file mode 100644 index 0000000..020ad88 --- /dev/null +++ b/internal/app/rendering/const_other.go @@ -0,0 +1,8 @@ +//go:build !windows +// +build !windows + +package rendering + +const ( + LineEnding string = "\\n" +) diff --git a/internal/app/rendering/const_windows.go b/internal/app/rendering/const_windows.go new file mode 100644 index 0000000..62a3084 --- /dev/null +++ b/internal/app/rendering/const_windows.go @@ -0,0 +1,5 @@ +package rendering + +const ( + LineEnding string = "\\r\\n" +) diff --git a/internal/app/rendering/reveal_params.go b/internal/app/rendering/reveal_params.go index 9c6bd7a..1b99f70 100644 --- a/internal/app/rendering/reveal_params.go +++ b/internal/app/rendering/reveal_params.go @@ -32,6 +32,7 @@ var defaultParams = RevealParams{ VerticalSeparator: "---", SlideNumberVisibility: "all", SlideNumberFormat: "h.v", + LineEnding: LineEnding, StyleSheets: make([]string, 0), FilesToMonitor: make([]string, 0), } @@ -48,6 +49,7 @@ type RevealParams struct { StyleSheets []string `mapstructure:"stylesheets"` FilesToMonitor []string `mapstructure:"filesToMonitor"` WorkingDirectory string `mapstructure:"working-dir"` + LineEnding string `mapstructure:"-"` } func (params *RevealParams) Load() error {