From 5de8eb789eab679f124d7ceb1dc512b2e3c752cb Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sun, 19 Sep 2010 13:21:32 +0000 Subject: [PATCH] [ECode] implemented --- Common/BBCodes/ECode.cs | 19 +++++++++++++++++++ Common/UBBParser.cs | 1 + 2 files changed, 20 insertions(+) create mode 100644 Common/BBCodes/ECode.cs diff --git a/Common/BBCodes/ECode.cs b/Common/BBCodes/ECode.cs new file mode 100644 index 0000000..db8de6c --- /dev/null +++ b/Common/BBCodes/ECode.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using PJonDevelopment.BBCode; + +namespace FLocal.Common.BBCodes { + class ECode : BBCode { + + public ECode() + : base("ecode") { + } + + public override string Format(ITextFormatter formatter) { + return this.GetInnerHTML(new BBCodeHtmlFormatter()); + } + + } +} diff --git a/Common/UBBParser.cs b/Common/UBBParser.cs index f4ef413..b6a2f94 100644 --- a/Common/UBBParser.cs +++ b/Common/UBBParser.cs @@ -118,6 +118,7 @@ namespace FLocal.Common { this.parser = new BBCodeParser(); this.parser.ElementTypes.Add("b", typeof(BBCodes.B), true); this.parser.ElementTypes.Add("code", typeof(BBCodes.Code), true); + this.parser.ElementTypes.Add("ecode", typeof(BBCodes.ECode), true); this.parser.ElementTypes.Add("font", typeof(BBCodes.Font), true); this.parser.ElementTypes.Add("color", typeof(BBCodes.FontColor), true); this.parser.ElementTypes.Add("size", typeof(BBCodes.FontSize), true);