-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
It would be very useful, to extend the markdown rendering with a regex search and replace. So, as a Stash Administrator I could configure the markdown engine to search and replace certain text strings with external links or custom HTML. Doing so would allow me to create links to external tools simply by finding certain text patterns in my Pull request descriptions, commit comments, etc.
Ultimately, I'm more less concerned about the rendered markdown of file contents and more concerned about the rendering of meta-data (Pull request descriptions, comments , commits, etc). However having it apply to both would be useful.
Please see "Section commentlink" - https://gerrit-documentation.storage.googleapis.com/Documentation/2.8.1/config-gerrit.html for a sample implementation of this concept. The configuration of such looks like the following:
[commentlink "bugzilla"] match = "(bug\\s+#?)(\\d+)" link = http://bugs.example.com/show_bug.cgi?id=$2 [commentlink "tracker"] match = ([Bb]ug:\\s+)(\\d+) html = $1<a href=\"http://trak.example.com/$2\">$2</a>
basically it would look for the text 'bug #1234' and convert that to a link like: 'http://bugs.example.com/show_bug.cgi?id=1234'
This is a feature common to most code browsing, and code review systems. And if included in Stash, would help set it far above any other competing product.
- is duplicated by
-
BSERV-3099 Support custom linkers
- Closed