the PHP lexer does not properly handle namespace separators in qualified names
Name of the lexer PHP
Code sample
<?php
use ScssPhp\ScssPhp\Compiler;
try {
$compiler = new Compiler();
echo $compiler->compileString($content)->getCss();
} catch (\Exception $e) {
echo '';
syslog(LOG_ERR, 'scssphp: Unable to compile content');
}
I could not provide this on http://rouge.jneen.net/ because I got 503 errors when trying to use it.
Additional context
the \ in catch(\Exception $e) gets highlighted as an error, while it is not an error
/cc @pyrmont as I saw you rewrote the PHP lexer
@stof I'm not working on this project any more but in my quick tests, it looks like there's a problem with the lexing of the ( after compileString. Not sure if fixing that will fix everything else.
@pyrmont which kind of problem ?
For reference, the live version of that code snippet is at https://scssphp.github.io/scssphp/docs/#security-considerations This is rendered using github pages, which uses rouge.
@stof If you paste your example up to the ( in the dingus, it updates the right hand side but as soon as you have the ( then it stops updating. So I assume there something breaking there.
Hi,
from my own testing, it seems that absolute name classes (which starts with a \) are not correctly handled: id_with_ns should be defined more like /#{id}(?:\\#{id})*|\\#{id}(?:\\#{id})*/ because currently, it does not allow this \ character at its beginning.
This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.