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

CSS extraction between brackets #1

Open
tholman opened this issue Jul 15, 2017 · 5 comments
Open

CSS extraction between brackets #1

tholman opened this issue Jul 15, 2017 · 5 comments

Comments

@tholman
Copy link

tholman commented Jul 15, 2017

Extracting the abbreviation of something like body{bg|} where | is the cursor results in body{bg} as the extraction. Should the correct behavior return just bg?

@ramya-rao-a
Copy link
Contributor

I believe this module only works for html abbreviations and not css

@sergeche Do you plan to include support for css as well?

@sergeche
Copy link
Member

Yes, current implementation works with markup abbreviations only but should also support CSS as well. Will implement CSS option later

@sergeche
Copy link
Member

Just published update (v0.1.5) that supports stylesheet abbreviations (without {} and []). New function interface: extract(line, pos, { lookAhead, syntax }), backward-compatible with extract(line, pos, lookAhead). Syntax is either markup or stylesheet.

To extract stylesheet abbreviation: extract('foo{bar}', 7, { syntax: 'stylesheet' })bar

@ramya-rao-a
Copy link
Contributor

Thanks @sergeche
Will test it out

@ramya-rao-a
Copy link
Contributor

@sergeche The fix made for #2 is not getting applied in the latest module when using the old interface. This is because the syntax doesn't get set. I created a PR to fix this #4. Please do take a look

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

3 participants