Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-4434

Extending markdown with configurable links

    XMLWordPrintable

Details

    • 0
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      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.

      Attachments

        1. commit-list-with-issues.png
          5 kB
          Bryan Turner
        2. commit-sidebar.png
          4 kB
          Bryan Turner
        3. pull-request-commit-list.png
          6 kB
          Bryan Turner
        4. pull-request-sidebar.png
          3 kB
          Bryan Turner

        Issue Links

          Activity

            People

              Unassigned Unassigned
              108ae665c440 James Gartrell
              Votes:
              8 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated: