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

Already on GitHub? Sign in to your account

extract scope from whole line #1

gregsadetsky opened this Issue Jan 4, 2013 · 0 comments


None yet
1 participant

gregsadetsky commented Jan 4, 2013

When extracting scope of current selection, check if boundary chars (first and last) are single or double quotes. if so, use this file name. This works for situations such as:

<link href="app.css" rel="stylesheet">

when the cursor is placed anywhere in the app.css text.

Otherwise (if bounding chars are not single or double quotes), extract the current selection's line, and check for src=['"].+['"] and failing that, href=['"].+['"]. This will work with the above <link> with the cursor placed anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment