phpsass icon indicating copy to clipboard operation
phpsass copied to clipboard

sass source map line number not calculated correctly

Open ZiggyQubert opened this issue 12 years ago • 0 comments

Two issues I have found -

  1. the line number that is written is not in a format compatible with chromes sass source map, it is expecting something like \0000310 instead of just the line number

I fixed this on my system by changing line 115 of SassCompactRender to - $debug .= 'line{' . self::DEBUG_INFO_PROPERTY . ":\00003{$node->line};}";

this works with chrome and the chrome sass properties extension I also changed line 114 to $debug .= 'filename{' . self::DEBUG_INFO_PROPERTY . ':' . preg_replace('/([^-\w])/', '\\1', "file://{$node->filename}") . '}';

to remove an exteranious semicollon from the end of the file name

  1. Line comments (// comments no /* */ comments) included in the source sass file do not incriment the line number for debug information, so it winds up being inacurate

ZiggyQubert avatar Feb 07 '13 19:02 ZiggyQubert