View Single Post
Old 05-09-2022, 10:35 AM   #89
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,939
Karma: 6361444
Join Date: Nov 2009
Device: many
Its a bug in cutils2.py in the removeBadAttributesfromCSS(wdir, file) routine.

It does not properly skip over the selector line in the css and instead treats every line in the css file like an "property: value;" line and near the end of that routine does the following:

Code:
            else:
                if 'a:link' not in line and 'a:visited' not in line:
                    if ':' in line:
                        if ': ' in line:
                            pass
                        else:
                            line = line.replace(':', ': ')                        
                outfp.write(line)
The list of exclusions should be greatly extended to skip things if this is a selector line or to at least skip all know pseudo elements and pseudo classes.

Perhaps you can help the author of this plugin by making a list of all legal pseudo classes and psuedo elements so that a proper set of exclusions from applying this rule can be more easily added.

Or alternatively, the author could use the python css-parser module that is part of every Sigil plugin environment, to screen things to only apply to

property : value;

lines of a selector and not the selector itself.

Last edited by KevinH; 05-09-2022 at 10:39 AM.
KevinH is offline   Reply With Quote