sub _parse_config {
my ($self, $evt) = @_;
my %config = ( # adapted from CSS::Tiny, extracts -scs- prefix.
- map /^\s*-scs-([\w._-]+)\s*:\s*(.*?)\s*$/,
+ map { # converts -scs-foo-bar: to foo_bar
+ /^\s*-scs-([\w._-]+)\s*:\s*(.*?)\s*$/;
+ (join('_', split '-', $1), $2);
+ }
grep { /\S/ } split /\;/, ($evt->{attrs}{style}||'')
);
s/^'(.*)'$/$1/ for values %config;