Use callback to detect redfam.section
Detecting redfam-Sections via RegExp caused some false positives due to wrong formated things in wikisyntax. See Task Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=78 FS#78]
This commit is contained in:
@@ -28,9 +28,10 @@ Provides a class for handling redundance discussion pages and archives
|
||||
import pywikibot # noqa
|
||||
import mwparserfromhell as mwparser
|
||||
|
||||
import jogobot
|
||||
import jogobot # noqa
|
||||
|
||||
from mysqlred import MysqlRedPage
|
||||
from redfam import RedFamParser
|
||||
|
||||
|
||||
class RedPage:
|
||||
@@ -116,7 +117,7 @@ class RedPage:
|
||||
# include_lead = if true include first section (intro)
|
||||
# include_heading = if true include heading
|
||||
fams = self.wikicode.get_sections(
|
||||
matches=jogobot.config["redundances"]["section_heading_regex"],
|
||||
matches=RedFamParser.is_section_redfam_cb,
|
||||
include_lead=False, include_headings=True )
|
||||
|
||||
# Iterate over RedFam
|
||||
|
||||
Reference in New Issue
Block a user