public override string MarkUpToHTML(string source)
        {
            var output = new EscapeOutputter();

            TextileFormatter.FormatString(source, output);
            return(output.Result);
        }
Example #2
0
        public void PhraseModifierFormatTestAllMixed()
        {
            string input    = "I seriously *{color:red}blushed* when I _(big)sprouted_ that corn stalk from my %[es]cabeza%.";
            string expected = "<p>I seriously <strong style=\"color:red;\">blushed</strong> when I <em class=\"big\">sprouted</em> that corn stalk from my <span lang=\"es\">cabeza</span>.</p>\n";
            string actual   = TextileFormatter.FormatString(input);

            Assert.AreEqual(expected, actual);
        }
 public string ScriptToHtml(string script)
 {
     if (script == null)
     {
         throw new ArgumentNullException("script");
     }
     return(TextileFormatter.FormatString(script));
 }
Example #4
0
        public void Hyperlink()
        {
            const string input    = @"""get lost"":http://google.ca";
            const string expected = "<p><a href=\"http://google.ca\">get lost</a></p>\r\n";
            var          actual   = TextileFormatter.FormatString(input);

            Assert.AreEqual(expected, actual);
        }
Example #5
0
        public void BulletList()
        {
            const string input    = @"* me
* is
* the
* hello";
            const string expected = @"<ul>
<li>me</li>
<li>is</li>
<li>the</li>
<li>hello</li>
</ul>
";
            var          actual   = TextileFormatter.FormatString(input);

            Assert.AreEqual(expected, actual);
        }
Example #6
0
        public string Process(string input)
        {
            var output = TextileFormatter.FormatString(input);

            return(output);
        }
Example #7
0
 public IContentProvider FillProvider(IContentProvider provider)
 {
     provider.Content = TextileFormatter.FormatString(File.ReadAllText(_Path));
     return(provider);
 }