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

Mentions should not be expanded inside Markdown code blocks

    XMLWordPrintable

Details

    Description

      As part of BSERV-5441 the front-end behaviour of mentions inside Markdown code blocks was fixed, however mentions are still expanded on the server side - so a preview/save will expand the mention inside a code block.

      In an ideal world, our mentions do not get expanded inside Markdown code blocks because an "@" followed by a string can be a valid identifier, even if it does match a user, it should not be expanded.

      For example, if the system contains a user with username "echo" and let's say their name is "Edwin Cho" the following code block would be expanded:

      From Markdown code
       
      ```
      @echo off
      cd C:\code
      ```
      
      To expanded code result
      Edwin Cho off
      cd C:\code
      

      If possible, perhaps the Markdown conversion can be performed first and then ignore any text within a <code> or <pre> block.

      This also affects code suggestions.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jvanderloo@atlassian.com John van der Loo (Inactive)
              Votes:
              14 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync