aboutsummaryrefslogtreecommitdiff
path: root/sources/wiki
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-14 23:00:10 +0100
committerJochen Topf <jochen@topf.org>2013-01-14 23:00:10 +0100
commit1f26d901924b3081d3084addc707f0182021c93b (patch)
treefa4b05dde4fb76387c513a60679a2c0b6b8bbc8d /sources/wiki
parentd6a69615a7bcedab601ba579a7c33c3278d5bdc7 (diff)
downloadtaginfo-1f26d901924b3081d3084addc707f0182021c93b.tar
taginfo-1f26d901924b3081d3084addc707f0182021c93b.tar.gz
Remove HTML comments from wiki pages
Diffstat (limited to 'sources/wiki')
-rwxr-xr-xsources/wiki/get_wiki_data.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/wiki/get_wiki_data.rb b/sources/wiki/get_wiki_data.rb
index 8dc4252..5ff8cbb 100755
--- a/sources/wiki/get_wiki_data.rb
+++ b/sources/wiki/get_wiki_data.rb
@@ -17,7 +17,7 @@
#
#------------------------------------------------------------------------------
#
-# Copyright (C) 2012 Jochen Topf <jochen@remote.org>
+# Copyright (C) 2013 Jochen Topf <jochen@remote.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -148,7 +148,7 @@ class WikiPage
# and their parameters.
def parse_content
@parsed = true
- text = @content
+ text = @content.gsub(%r{<!--.*?-->}, '')
# dummy template as base context
context = [ Template.new ]
@@ -280,7 +280,7 @@ File.open(dir + '/tagpages.list') do |wikipages|
get_page(db, api, page)
page.parse_content do |template|
- puts "Template: #{template.name} [#{template.parameters.join(',')}] #{template.named_parameters.inspect}"
+ #puts "Template: #{template.name} [#{template.parameters.join(',')}] #{template.named_parameters.inspect}"
if template.name == 'Key' || template.name == 'Tag'
tag = template.parameters[0]
if template.parameters[1]