mediawiki-page-replaceable_content 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mediawiki/page.rb +2 -3
- data/mediawiki-page-replaceable_content.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1ee35d1058df4b6448c698504b98a6c1ca8619e
|
4
|
+
data.tar.gz: 73d033433bd1fdeafed00eb37f23d88246eb1e91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb918dcf68bcddae4f88c2f816150e2a5c23583e5eefbffaca0d107525e179688a86747c01b3be51aaed9a56427abd139f9dbb68776442cc8dea6ff11b2bfd9e
|
7
|
+
data.tar.gz: e8c133b5724ae36ab41ed94defaa696a410831955da5c5e51402f9775276eaf467f37cf1a6b5ce54200b5207b4517dc48b1d812011d9a5e5965aebcfe0933b18
|
data/lib/mediawiki/page.rb
CHANGED
@@ -16,8 +16,7 @@ module MediaWiki
|
|
16
16
|
def reassemble_page(new_content, run_comment = '')
|
17
17
|
"%<before>s{{%<template_name>s%<parameters>s}}
|
18
18
|
#{new_content}
|
19
|
-
<!-- OUTPUT END #{run_comment}
|
20
|
-
%<keep>s" % page_parts
|
19
|
+
<!-- OUTPUT END #{run_comment} -->%<keep>s" % page_parts
|
21
20
|
end
|
22
21
|
|
23
22
|
def replace_output(new_content, run_comment = '')
|
@@ -73,7 +72,7 @@ module MediaWiki
|
|
73
72
|
# the special HTML comment that marks the end of the previous
|
74
73
|
# output; if it's not there we insert the new content right
|
75
74
|
# after the template tag.
|
76
|
-
if after =~ /^(?<to_replace>.*?)\n<!-- OUTPUT END (?:.*?)
|
75
|
+
if after =~ /^(?<to_replace>.*?)\n<!-- OUTPUT END (?:.*?)-->(?<keep>.*)/m
|
77
76
|
matchdata_to_h(Regexp.last_match)
|
78
77
|
else
|
79
78
|
{ to_replace: '', keep: after }
|
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'mediawiki-page-replaceable_content'
|
8
|
-
spec.version = '0.1.
|
8
|
+
spec.version = '0.1.2'
|
9
9
|
spec.authors = ['EveryPolitician']
|
10
10
|
spec.email = ['team@everypolitician.org']
|
11
11
|
spec.licenses = ['MIT']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediawiki-page-replaceable_content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- EveryPolitician
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mediawiki_api
|