Skip to content

Commit

Permalink
Properly escape $-usage with span-tags (#198)
Browse files Browse the repository at this point in the history
On May 19th GitHub Markdown started to support math-mode using `$`-signs which breaks the documentation; see usage [here](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions)
  • Loading branch information
ichistmeinname authored Feb 21, 2023
1 parent 0b499bd commit 3a68c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use it to add custom auto-linking on your Mattermost system, such as adding link

Autolinks have 3 parts: a **Pattern** which is a regular expression search pattern utilizing the [Golang regexp library](https://golang.org/pkg/regexp/), a **Template** that gets expanded and an optional **Scope** parameter to define which team/channel the autolink applies to. You can create variables in the pattern with the syntax `(?P<name>...)` which will then be expanded by the corresponding template.

In the template, a variable is denoted by a substring of the form `$name` or `${name}`, where `name` is a non-empty sequence of letters, digits, and underscores. A purely numeric name like $1 refers to the submatch with the corresponding index. In the $name form, name is taken to be as long as possible: $1x is equivalent to ${1x}, not ${1}x, and, $10 is equivalent to ${10}, not ${1}0. To insert a literal $ in the output, use $$ in the template.
In the template, a variable is denoted by a substring of the form `$name` or `${name}`, where `name` is a non-empty sequence of letters, digits, and underscores. A purely numeric name like <span>$</span>1 refers to the submatch with the corresponding index. In the <span>$</span>name form, name is taken to be as long as possible: <span>$</span>1x is equivalent to <span>$</span>{1x}, not <span>$</span>{1}x, and, <span>$</span>10 is equivalent to <span>$</span>{10}, not <span>$</span>{1}0. To insert a literal <span>$</span> in the output, use <span>$$</span> in the template.

The scope must be either a team (`teamname`) or a team and a channel (`teamname/channelname`). Remember that you must provide the entity name, not the entity display name. Since Direct Messages do not belong to any team, scoped matches will not be autolinked on Direct Messages. If more than one scope is provided, matches in at least one of the scopes will be autolinked.

Expand Down

0 comments on commit 3a68c6d

Please sign in to comment.