Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
9013db2b
Commit
9013db2b
authored
Apr 23, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly parsing attribute selectors of the form '[attr]'.
parent
3b0663f4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
document_parser.cpp
document_parser.cpp
+2
-1
node.cpp
node.cpp
+1
-1
No files found.
document_parser.cpp
View file @
9013db2b
...
...
@@ -399,7 +399,8 @@ namespace Sass {
lex
<
exactly
<
'['
>
>
();
if
(
!
lex
<
type_selector
>
())
syntax_error
(
"invalid attribute name in attribute selector"
);
Token
name
(
lexed
);
attr_sel
<<
Node
(
Node
::
value
,
line_number
,
lexed
);
attr_sel
<<
Node
(
Node
::
value
,
line_number
,
name
);
if
(
lex
<
exactly
<
']'
>
>
())
return
attr_sel
;
if
(
!
lex
<
alternatives
<
exact_match
,
class_match
,
dash_match
,
prefix_match
,
suffix_match
,
substring_match
>
>
())
{
syntax_error
(
"invalid operator in attribute selector for "
+
name
.
to_string
());
...
...
node.cpp
View file @
9013db2b
...
...
@@ -125,7 +125,7 @@ namespace Sass {
string
result
(
prefix
);
if
(
!
prefix
.
empty
())
result
+=
" "
;
result
+=
"["
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
for
(
int
i
=
0
;
i
<
size
()
;
++
i
)
{
result
+=
at
(
i
).
to_string
(
prefix
);
}
result
+=
']'
;
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment