santiycr / cssify

XPATH to CSS translator
MIT License
132 stars 45 forks source link

custom html elements with "-" dash, not translated properly #12

Open justnpT opened 3 years ago

justnpT commented 3 years ago

//sgswidget//a[contains(@href,'dashboard/profile')]

is translated proprely: 'sgswidget a[href*=dashboard/profile]'

current behaviour:

just add a dash to sgswidget //sgs-widget//a[contains(@href,'dashboard/profile')]

and you will get the error:

cssify.cssify.XpathException: Invalid or unsupported Xpath: //sgs-widget//a[contains(@href,'dashboard/profile')]

expected condition:

//sgs-widget//a[contains(@href,'dashboard/profile')]

should be traslated properly to:

'sgs-widget a[href*=dashboard/profile]'