Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Brackets should not be highlighted when cursor is in content between tags with Handlebars #344

Open
svipas opened this issue Feb 5, 2018 · 5 comments

Comments

@svipas
Copy link

svipas commented Feb 5, 2018

Edited by @rsese

  1. Save a file named test.hbs with this content:
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    {{table/occlusion-table
      items=items
      columns=columns
      tabName="Departments"
    }}
  </body>
</html>
  1. Place your cursor anywhere on the items=items line.

Expected behavior

Expect {{ and }} to be highlighted - there should be nothing highlighted if your cursor is on the content between brackets.

Actual behavior

<body> and </body> are highlighted.


Bracket matcher:
As you can see my cursor is on {{table}}, but it shows bracket matcher and underline on h4 tag which is wrong... By the way, this is handlebars file.

image

Atom: 1.23.3
OS: macOS

@rsese
Copy link

rsese commented Feb 8, 2018

Thanks for the report - I'm unable to reproduce with 1.23.3 on macOS 10.12.6. Can you reproduce in safe mode (atom --safe)? If you can copy/paste the raw HTML that would be helpful too.

@ghost
Copy link

ghost commented Feb 14, 2018

@rsese

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    {{table/occlusion-table
      items=items
      columns=columns
      tabName="Departments"
    }}
  </body>
</html>

Try to add cursor for e.g. on items=items and you will see body will be selected instead of {{

I checked it on latest Atom Beta without any third party extensions. It was the same with 1.23.3.

@rsese
Copy link

rsese commented Feb 15, 2018

Thanks @bsvipas - I tried with the 1.25.0-beta0 in safe mode and couldn't reproduce again. I also tried temporarily resetting back to factory defaults:

http://flight-manual.atom.io/hacking-atom/sections/debugging/#reset-to-factory-defaults

But still couldn't reproduce in this case. If I put the cursor on items=items, nothing is highlighted.

test-bracket-matcher

Can you confirm if you temporarily reset to factory defaults if you can still reproduce?

@svipas
Copy link
Author

svipas commented Feb 18, 2018

@rsese Try to use .hbs extension instead of .html.

@rsese
Copy link

rsese commented Feb 19, 2018

Thanks @svipben, I see the behavior now - I've updated the issue body to add more specific details.

@rsese rsese changed the title Bracket matcher Brackets should not be highlighted when cursor is in content between brackets with Handlebars Jul 2, 2018
@rsese rsese changed the title Brackets should not be highlighted when cursor is in content between brackets with Handlebars Brackets should not be highlighted when cursor is in content between tags with Handlebars Jul 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants