Skip to content

Commit

Permalink
utils/cobrautil/templates: change <br> to <p/> for new paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk committed May 28, 2024
1 parent 37cbcfc commit d944823
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bind/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func PAC(fs *pflag.FlagSet, pac **url.URL) {
fs.VarP(anyflag.NewValue[*url.URL](*pac, pac, fileurl.ParseFilePathOrURL),
"pac", "p", "`<path or URL>`"+
"Proxy Auto-Configuration file to use for upstream proxy selection. "+
"<br><br>"+
"<p/>"+
"Syntax:"+
"<ul>"+
"<li>File: <code>/path/to/file.pac</code>"+
Expand Down Expand Up @@ -158,7 +158,7 @@ func DirectDomains(fs *pflag.FlagSet, cfg *[]ruleset.RegexpListItem) {
"This flag takes precedence over the PAC script.")
}

const pathOrBase64Syntax = "<br><br>" +
const pathOrBase64Syntax = "<p/>" +
"Syntax:" +
"<ul>" +
"<li>File: <code>/path/to/file.pac</code>" +
Expand Down Expand Up @@ -341,7 +341,7 @@ func HTTPLogConfig(fs *pflag.FlagSet, cfg []NamedParam[httplog.Mode]) {

fs.Var(f, "log-http", valueType+",... "+
"HTTP request and response logging mode. "+
"<br><br>"+
"<p/>"+
"Modes: "+
"<ul>"+
"<li>none: no logging"+
Expand Down
2 changes: 1 addition & 1 deletion utils/cobrautil/templates/help_flags_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (p *HelpFlagPrinter) PrintHelpFlag(flag *flag.Flag) {

func (p *HelpFlagPrinter) replaceHTML(s string) string {
r := strings.NewReplacer(
"<br>", "\n",
"<p/>", "\n\n",
"<ul>", "",
"<li>", "\n- ",
"</ul>", "\n\n",
Expand Down
2 changes: 1 addition & 1 deletion utils/cobrautil/templates/markdown_flag_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (p *MarkdownFlagPrinter) PrintHelpFlag(f *pflag.Flag) {
func (p *MarkdownFlagPrinter) replaceHTML(s string) string {
r := strings.NewReplacer(
". ", ".\n",
"<br>", "\n",
"<p/>", "\n\n",
"<ul>", "\n",
"<li>", "\n- ",
"</ul>", "\n\n",
Expand Down
2 changes: 1 addition & 1 deletion utils/cobrautil/templates/yaml_flag_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (p *YamlFlagPrinter) PrintHelpFlag(f *pflag.Flag) {

func (p *YamlFlagPrinter) replaceHTML(s string) string {
r := strings.NewReplacer(
"<br>", "\n",
"<p/>", "\n\n",
"<ul>", "",
"<li>", "\n- ",
"</ul>", "\n\n",
Expand Down

0 comments on commit d944823

Please sign in to comment.