Skip to content

Commit eef4689

Browse files
author
Hugo Hörnquist
committed
sync-docs.sh trim of leading whitespace.
1 parent 261b010 commit eef4689

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sync-docs.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ replace_section()
7575
local man_section="$1"
7676
local md_section="$2"
7777
local command="$3"
78+
local extra_command="$4"
7879

7980
{
8081
# Output until the specified section
@@ -101,7 +102,10 @@ replace_section()
101102
/
102103
s/^ \* /.IP "" 12\
103104
/
105+
# format urls
104106
s/\[\([^]]*\)\](\([^)]*\))/\1 <\2>/
107+
108+
'"$extra_command"'
105109
p
106110
}' README.md
107111

@@ -118,8 +122,9 @@ replace_section 'GIT ISSUE COMMANDS' 'Use' 's/^\* `\([^`]*\)`: /.RE\
118122
.PP\
119123
\\fB\1\\fP\
120124
.RS 4\
121-
/'
122-
replace_section FILES 'Internals'
125+
/' 's/^ \+//'
126+
127+
replace_section FILES 'Internals' '' 's/^ \+//'
123128
# shellcheck disable=SC2016
124129
replace_section EXAMPLES 'Example session' '/```/d;/^###/N;s/^### \(.*\)/.fi\
125130
.ft R\

0 commit comments

Comments
 (0)