Merge branch 'fs#115-lsec-no-template' into test-v3
This commit is contained in:
@@ -214,11 +214,12 @@ class MarkPagesBot( CurrentPageBot ): # sets 'current_page' on each treat()
|
|||||||
# There is none on empty pages, so we need to check
|
# There is none on empty pages, so we need to check
|
||||||
if leadsec:
|
if leadsec:
|
||||||
# Get the last template in leadsec
|
# Get the last template in leadsec
|
||||||
ltemplate = leadsec.filter_templates()[-1]
|
ltemplates = leadsec.filter_templates()
|
||||||
|
|
||||||
# If there is one, add notice after this
|
# If there is one, add notice after this
|
||||||
if ltemplate:
|
if ltemplates:
|
||||||
self.current_wikicode.insert_after(ltemplate, self.disc_notice)
|
self.current_wikicode.insert_after( ltemplates[-1],
|
||||||
|
self.disc_notice )
|
||||||
|
|
||||||
# To have it in its own line we need to add a linbreak before
|
# To have it in its own line we need to add a linbreak before
|
||||||
self.current_wikicode.insert_before(self.disc_notice, "\n" )
|
self.current_wikicode.insert_before(self.disc_notice, "\n" )
|
||||||
|
|||||||
Reference in New Issue
Block a user