Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting is randomly broken #181

Closed
evilhamsterman opened this issue Sep 14, 2018 · 2 comments
Closed

Highlighting is randomly broken #181

evilhamsterman opened this issue Sep 14, 2018 · 2 comments

Comments

@evilhamsterman
Copy link

Environment

  • Extension version: 0.4.0
  • OS Type: MacOS

Summary

After fixing the issues with nested lists of dictionaries in #168 now the issue is happening with just general attributes of dictionaries, when it fails seems random. One specific case I found is if a hostname in an inventory has a - in the name.

Reproduce steps

Create a task or an inventory file. Example the last line backup is not highlighted but it is if you move it up a line

- name: Point repos to local mirror  on {{ inventory_hostname }}
  become: yes
  template:
    src: templates/sources.list.j2
    dest: /etc/apt/sources.list
    owner: root
    group: root
    mode: "u=rw,g=r,o=r"
    backup: yes

Expected Results

Everything is highlighted if backup isn't the last line
screen shot 2018-09-14 at 1 33 10 pm

Everything is highlighted
screen shot 2018-09-14 at 1 37 09 pm

Actual Results

screen shot 2018-09-14 at 1 32 56 pm
screen shot 2018-09-14 at 1 37 02 pm

@yungezz yungezz mentioned this issue Sep 17, 2018
@yungezz
Copy link
Contributor

yungezz commented Sep 17, 2018

the first case could be fixed by PR #182 , it's due to matching attributes aggressive end. While the second case is actually caused by the - in variable name, quick workaround is remote it, host-name to hostname. Fixing of it will need touch base syntax regex expression of ansible, it need be careful, and verbose testing.

@yungezz
Copy link
Contributor

yungezz commented Sep 21, 2018

we don't have plan for fixing second issue for now. the first issue was fixed and release. close the issue for now.

@yungezz yungezz closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants