diff --git a/conf/default.php b/conf/default.php index e743d40..58f8902 100755 --- a/conf/default.php +++ b/conf/default.php @@ -53,4 +53,5 @@ $conf['logging'] = 0; $conf['restrict'] = ''; $conf['skipRegex'] = ':(playground|sandbox)(:|$)'; $conf['matchRegex'] = ''; +$conf['ignoreRegex'] = ''; $conf['preferUIlanguage'] = 0; diff --git a/conf/metadata.php b/conf/metadata.php index c4b9431..719fb53 100755 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -60,6 +60,7 @@ $meta['logging'] = array('onoff'); $meta['restrict'] = array('string'); $meta['skipRegex'] = array('string'); $meta['matchRegex'] = array('string'); +$meta['ignoreRegex'] = array('string'); $meta['preferUIlanguage'] = array('multichoice', '_choices' => array( \dokuwiki\plugin\aichat\AIChat::LANG_AUTO_ALL, \dokuwiki\plugin\aichat\AIChat::LANG_UI_ALL, diff --git a/lang/en/settings.php b/lang/en/settings.php index 987ce07..2d163c2 100755 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -45,6 +45,7 @@ $lang['logging'] = 'Log all questions and answers. Use the doc); $this->doc = ltrim($this->doc); // remove leading space and empty lines + + // remove ignored parts + $regex = $this->getConf('ignoreRegex'); + if($regex) { + $this->doc = preg_replace('/' . $regex . '/i', '', $this->doc); + } } /** @inheritdoc */