Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
61d3fdb4
Unverified
Commit
61d3fdb4
authored
Apr 19, 2021
by
Viktor Söderqvist
Committed by
GitHub
Apr 19, 2021
Browse files
Fix space included in links in modules API doc (#8818)
parent
53a4d6c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/modules/gendoc.rb
View file @
61d3fdb4
...
@@ -23,8 +23,8 @@ def markdown(s)
...
@@ -23,8 +23,8 @@ def markdown(s)
# Add backquotes around macro and var names containing underscores.
# Add backquotes around macro and var names containing underscores.
l
=
l
.
gsub
(
/(?<![`A-z\*])[A-Za-z]+_[A-Za-z0-9_]+/
){
|
x
|
"`
#{
x
}
`"
}
l
=
l
.
gsub
(
/(?<![`A-z\*])[A-Za-z]+_[A-Za-z0-9_]+/
){
|
x
|
"`
#{
x
}
`"
}
# Link URLs preceded by space or newline (not already linked)
# Link URLs preceded by space or newline (not already linked)
l
=
l
.
gsub
(
/(
(?:
^| )https?:\/\/[A-Za-z0-9_\/\.\-]+[A-Za-z0-9\/])/
,
l
=
l
.
gsub
(
/(^| )
(
https?:\/\/[A-Za-z0-9_\/\.\-]+[A-Za-z0-9\/])/
,
'[\
1
](\
1
)'
)
'
\1
[\
2
](\
2
)'
)
# Replace double-dash with unicode ndash
# Replace double-dash with unicode ndash
l
=
l
.
gsub
(
/ -- /
,
' – '
)
l
=
l
.
gsub
(
/ -- /
,
' – '
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment