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

Syntax highlighting is incorrect for certain JavaScript use cases

      Issue Summary

      For certain use cases of JavaScript, the syntax highlighting that is used when displaying the source of .js files is incorrect.

      Steps to Reproduce

      1. Have a .js file with the following content
        public something(callback: callback, options?: ConsumerOptions): Promise<Consumer> {
        	console.info(`[${this.constructor.name}] Consumer creating.`);
        
        	this.consumer = Consumer.create({
        		...options,
        		queueUrl: await this.getUrl(),
        		handleMessage: message => {
        			if (message.Body){
        				message.Body = JSON.parse(message.Body);
        			}
        		}
        	})
        }
        
      2. View the file in source view

      Expected Results

      The syntax is highlighted consistently, something like this way:

      Actual Results

      The syntax is highlighted incorrectly:

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [BSERV-12857] Syntax highlighting is incorrect for certain JavaScript use cases

            No work has yet been logged on this issue.

              Unassigned Unassigned
              cglockner Christian Glockner
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: