Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Selector line parsing no longer fails when checking for poorly formed comments. #177

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ protected function parse_selector_line($line, $level){
$len = strlen($line);
for($i = 0; $i < $len; $i++ ){
$this->switch_string_state($line{$i});
if($this->state != 'st' && $line{$i} == '/' && $line{$i+1} == '/'){ // Break on comment
if($this->state != 'st' && (isset($line{$i}) && $line{$i} == '/') && (isset($line{$i+1}) && $line{$i+1} == '/') ){ // Break on comment
break;
}
$this->token .= $line{$i};
Expand Down