subtitle handling, prettified dates. bugfixes and better errors
[scpubgit/SCS.git] / lib / SCSite / Filter.pm
index 6897fc7..16e9896 100644 (file)
@@ -18,7 +18,10 @@ sub callback_for {
 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;