Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

JSX highlighter incorrectly matches brace when {{double curly braces are present}} #3871

Open jshrek opened 4 years ago

jshrek commented 4 years ago

Short Summary

JSX highlighter incorrectly highlights/matches brace when there are {{double curly braces}} in the code.

I have the following sample code with {{double curly braces}} and the highlighter works incorrectly when trying to find the matching brace.

So in the example below, if I go to the very last } curly brace at bottom, it is supposed to match with the { brace on this line: export default class App extends React.Component { But instead it matches with the one on the render() { line.

If I remove the double-curly section { flex:1 } then all the braces match properly.

Steps to Reproduce

Try this code, and put your cursor beside the very last/bottom } curly brace.

export default class App extends React.Component {
   render() {
      return (
            <View style={{flex:1}}>
            </View>
      );
   }
}

Expected results

The matching { brace should highlight which is the one on the line: export default class App extends React.Component {

Actual results

Two incorrect braces are matched.

If you delete the double curly brace section {flex:1} then the braces all match properly.

See attached screenshots.

Platform Information

Komodo Edit Komodo Version 12.0.1 Win 10

Screenshot of problem: problem

Screenshot with no problem: okay