GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

Unverified Commit 752887b9 authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Update RE used to prefix links with /help/

Update the regular expression in the help controller used to prefix relative
links on the help page with /help/. As suggested by @rymai, the look-ahead
pattern to detect external links is simplified from `[a-zA-Z0-9.+-]` to `\w`.
parent 44d0d0e6
......@@ -14,10 +14,9 @@ def index
@help_index ='doc', '')).sub(YAML_FRONT_MATTER_REGEXP, '')
# Prefix Markdown links with `help/` unless they are external links.
# RFC3986 allows alphanumeric, '+', '-' and '.' for URL schema;
# '//' not necessarily part of URL, e.g.,
# See
@help_index.gsub!(%r{(?<delim>\]\()(?![a-zA-Z0-9.+-]+:)(?!/)(?<link>[^\)\(]+\))}) do
# See
@help_index.gsub!(%r{(?<delim>\]\()(?!\w+:)(?!/)(?<link>[^\)\(]+\))}) do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment