From 5aba03c0a823c5eb62d08281dc88b349c890059c Mon Sep 17 00:00:00 2001 From: Chri-s Date: Fri, 25 Apr 2014 00:30:39 +0200 Subject: [PATCH] Added option "stripBrs" ("Ignore
tags") --- .../lang_en.inc.php | 4 +++- .../serendipity_event_dpsyntaxhighlighter.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/serendipity_event_dpsyntaxhighlighter/lang_en.inc.php b/serendipity_event_dpsyntaxhighlighter/lang_en.inc.php index f2bde636..c1cb9784 100755 --- a/serendipity_event_dpsyntaxhighlighter/lang_en.inc.php +++ b/serendipity_event_dpsyntaxhighlighter/lang_en.inc.php @@ -28,4 +28,6 @@ @define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_SMARTTABS', 'Smart tabs'); @define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_SMARTTABS_DESC', 'Allows you to turn smart tabs feature on and off.'); @define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_TABSIZE', 'Tab size for smart tabs'); -@define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_TABSIZE_DESC', 'Allows you to adjust tab size.'); \ No newline at end of file +@define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_TABSIZE_DESC', 'Allows you to adjust tab size.'); +@define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_STRIPBRS', 'Ignore
tags'); +@define('PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_STRIPBRS_DESC', 'If your software adds
tags at the end of each line, this option allows you to ignore those..'); \ No newline at end of file diff --git a/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php b/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php index 09bae9c2..176b1abd 100755 --- a/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php +++ b/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php @@ -66,6 +66,7 @@ class serendipity_event_dpsyntaxhighlighter extends serendipity_event { $conf_array[] = 'gutter'; $conf_array[] = 'smart-tabs'; $conf_array[] = 'tab-size'; + $conf_array[] = 'stripBrs'; $propbag->add('configuration', $conf_array); } @@ -137,6 +138,12 @@ class serendipity_event_dpsyntaxhighlighter extends serendipity_event { $propbag->add('default', '4'); $propbag->add('validate', 'number'); break; + case 'stripBrs': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_STRIPBRS); + $propbag->add('description', PLUGIN_EVENT_DPSYNTAXHIGHLIGHTER_STRIPBRS_DESC); + $propbag->add('default', 'false'); + break; } return true; } @@ -173,6 +180,11 @@ class serendipity_event_dpsyntaxhighlighter extends serendipity_event { $footer_add .= '