Skip to content

Commit c9a997f

Browse files
committed
A selector with :extend is never a mixin. fix #67
1 parent 6a02d1b commit c9a997f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/com/inet/lib/less/LessParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* MIT License (MIT)
33
*
4-
* Copyright (c) 2014 - 2019 Volker Berlin
4+
* Copyright (c) 2014 - 2020 Volker Berlin
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -234,7 +234,7 @@ private void parseSemicolon( FormattableContainer currentRule ) {
234234
}
235235
break;
236236
case '(':
237-
if( !reader.nextIsMixinParam( false ) ) {
237+
if( !reader.nextIsMixinParam( false ) || builder.indexOf( ":extend" ) >= 0 ) {
238238
builder.append( ch );
239239
break;
240240
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
h1,
2+
h2 {
3+
font-size: 20px;
4+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
h1 {
2+
font-size: 20px;
3+
}
4+
h2 {
5+
&:extend(h1);
6+
}

0 commit comments

Comments
 (0)