Fix CRLF vs. LF for slide separators on windows and everything else
This commit is contained in:
parent
fd73f607d6
commit
2cc48cfbb0
4 changed files with 19 additions and 4 deletions
|
@ -18,8 +18,8 @@
|
|||
<div class="reveal">
|
||||
<div class="slides">
|
||||
<section data-markdown="/content.md"
|
||||
data-separator="^\n{{ .Reveal.HorizontalSeparator }}\n"
|
||||
data-separator-vertical="^\n{{ .Reveal.VerticalSeparator }}\n"
|
||||
data-separator="^{{ .Reveal.LineEnding -}}{{ .Reveal.HorizontalSeparator }}{{- .Reveal.LineEnding }}"
|
||||
data-separator-vertical="^{{ .Reveal.LineEnding -}}{{ .Reveal.VerticalSeparator }}{{- .Reveal.LineEnding }}"
|
||||
data-separator-notes="^Note:"
|
||||
data-charset="iso-8859-15">
|
||||
</section>
|
||||
|
@ -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,
|
||||
|
|
8
internal/app/rendering/const_other.go
Normal file
8
internal/app/rendering/const_other.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package rendering
|
||||
|
||||
const (
|
||||
LineEnding string = "\\n"
|
||||
)
|
5
internal/app/rendering/const_windows.go
Normal file
5
internal/app/rendering/const_windows.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package rendering
|
||||
|
||||
const (
|
||||
LineEnding string = "\\r\\n"
|
||||
)
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue