Fix generating docs for templates with multi-line help (#10138)
This commit is contained in:
parent
45466316ea
commit
85546b5f0f
2 changed files with 8 additions and 5 deletions
|
|
@ -10,10 +10,12 @@ params:
|
|||
- name: host
|
||||
- name: password
|
||||
help:
|
||||
en: |
|
||||
User password, see https://github.com/Morluktom/ioBroker.lg-ess-home/tree/master#getting-the-password.Alteratively, use registration id for admin login.
|
||||
de: |
|
||||
Benutzerpasswort, siehe https://github.com/Morluktom/ioBroker.lg-ess-home/tree/master#getting-the-password.Alterativ kann die Registriernummer für Administratorlogin verwendet werden.
|
||||
en: >
|
||||
User password, see https://github.com/Morluktom/ioBroker.lg-ess-home/tree/master#getting-the-password.
|
||||
Alteratively, use registration id for admin login.
|
||||
de: >
|
||||
Benutzerpasswort, siehe https://github.com/Morluktom/ioBroker.lg-ess-home/tree/master#getting-the-password.
|
||||
Alterativ kann die Registriernummer für Administratorlogin verwendet werden.
|
||||
- name: registration
|
||||
advanced: true
|
||||
example: "DE200..."
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
|
|
@ -108,6 +109,6 @@ func (t *Template) RenderDocumentation(product Product, lang string) ([]byte, er
|
|||
|
||||
func localize(lang string) func(TextLanguage) string {
|
||||
return func(s TextLanguage) string {
|
||||
return s.String(lang)
|
||||
return strings.TrimSpace(s.String(lang))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue