Fix wrong parsing of CSS tags when the definition block starts on a new line (reported by Dominic Hopf, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3644 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
3c36f39cd5
commit
9318d1def6
@ -1,3 +1,10 @@
|
||||
2009-03-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
||||
* tagmanager/css.c:
|
||||
Fix wrong parsing of CSS tags when the definition block starts on
|
||||
a new line (reported by Dominic Hopf, thanks).
|
||||
|
||||
|
||||
2009-03-20 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||
|
||||
* plugins/htmlchars.c:
|
||||
|
||||
@ -73,23 +73,14 @@ static CssParserState parseCssDeclaration( const unsigned char **position, cssKi
|
||||
while ( isCssDeclarationAllowedChar(cp) ||
|
||||
*cp == '\0' ) /* track the end of line into the loop */
|
||||
{
|
||||
if( (int) *cp == '\0' )
|
||||
{
|
||||
cp = fileReadLine ();
|
||||
if( cp == NULL ){
|
||||
makeCssSimpleTag(name, kind, TRUE);
|
||||
*position = cp;
|
||||
return P_STATE_AT_END;
|
||||
}
|
||||
}
|
||||
else if( *cp == ',' )
|
||||
if( *cp == ',' )
|
||||
{
|
||||
makeCssSimpleTag(name, kind, TRUE);
|
||||
*position = cp;
|
||||
return P_STATE_NONE;
|
||||
}
|
||||
else if( *cp == '{' )
|
||||
{
|
||||
else if( *cp == '{' || *cp == '\0' )
|
||||
{ /* assume that line end is the same as a starting definition (i.e. the { is on the next line */
|
||||
makeCssSimpleTag(name, kind, TRUE);
|
||||
*position = cp;
|
||||
return P_STATE_IN_DEFINITION;
|
||||
@ -197,6 +188,8 @@ static CssParserState parseCssLine( const unsigned char *line, CssParserState st
|
||||
case P_STATE_IN_PAGE:
|
||||
case P_STATE_IN_FONTFACE:
|
||||
case P_STATE_IN_DEFINITION:
|
||||
if( *line == '\0' )
|
||||
line = fileReadLine ();
|
||||
if( *line == '}' )
|
||||
state = P_STATE_NONE;
|
||||
else if( *line == '\'' )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user