diff options
author | Yorhel <git@yorhel.nl> | 2015-11-01 13:42:56 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-11-01 13:43:50 +0100 |
commit | 8c9cfe238e565088b37d256eb461a01919ef9968 (patch) | |
tree | 56143b98815c308aa84dc626a91364db5eadec23 /lib/Multi/RG.pm | |
parent | 3c967881d7b5408a49f16de8b268b053d6ba9051 (diff) |
Switch to HTML5 doctype + s/acronym/abbr/ + s/ / /e
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers
won't allow you to use modern Javascript APIs with an older doctype.
Note that most pages don't actually validate correctly as HTML5, I'm
relying on browsers to be lenient.
In either case, I'd like VNDB to stay valid XML (XHTML5, then), and
luckily that shouldn't be a problem.
Diffstat (limited to 'lib/Multi/RG.pm')
-rw-r--r-- | lib/Multi/RG.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm index 177a82be..eade569a 100644 --- a/lib/Multi/RG.pm +++ b/lib/Multi/RG.pm @@ -256,8 +256,6 @@ sub processgraph { # Before saving the SVG output, we'll modify it a little: # - Remove comments - # - Add svg: prefix to all tags - # - Remove xmlns declarations (this is set in the html) # - Remove <title> elements (unused) # - Remove id attributes (unused) # - Remove first <polygon> element (emulates the background color) @@ -274,15 +272,15 @@ sub processgraph { $attr{class} = 'border' if $attr{stroke} && $attr{stroke} eq '#111111'; $attr{class} = 'nodebg' if $attr{fill} && $attr{fill} eq '#222222'; - delete @attr{qw|stroke fill xmlns xmlns:xlink|}; + delete @attr{qw|stroke fill|}; delete $attr{id} if $attr{id} && $attr{id} !~ /^node_[vp]\d+$/; - $w->tag("svg:$el", %attr, $el eq 'path' || $el eq 'polygon' ? undef : ()); + $w->tag($el, %attr, $el eq 'path' || $el eq 'polygon' ? undef : ()); }, End => sub { my($expat, $el) = @_; return if $el eq 'title' || $expat->in_element('title'); return if $el eq 'polygon' && $expat->depth == 2; - $w->end("svg:$el") if $el ne 'path' && $el ne 'polygon'; + $w->end($el) if $el ne 'path' && $el ne 'polygon'; }, Char => sub { my($expat, $str) = @_; |