public override string ModifyLine(string line)
 {
     // Encode the contents of the "<pre>" tags so that we don't
     // generate formatting out of it.
     line = NoTextileEncoder.EncodeNoTextileZones(line,
                                                  @"(?<=(^|\s)<pre(" + TextileGlobals.HtmlAttributesPattern + @")>)",
                                                  @"(?=</pre>)");
     return(line);
 }
Exemplo n.º 2
0
 public override string Conclude(string line)
 {
     // Recode everything except "<" and ">";
     line = NoTextileEncoder.DecodeNoTextileZones(line,
                                                  @"(?<=(^|\s)<code(" + TextileGlobals.HtmlAttributesPattern + @")>)",
                                                  @"(?=</code>)",
                                                  new string[] { "<", ">" });
     return(line);
 }
 internal static string InnerConclude(string line)
 {
     // Recode everything.
     line = NoTextileEncoder.DecodeNoTextileZones(line,
                                                  @"(?<=(^|\s)<pre(" + Globals.HtmlAttributesPattern + @")>)",
                                                  @"(?=</pre>)",
                                                  new string[] { "<", ">" });
     return(line);
 }
        internal static string InnerModifyLine(string line)
        {
            // Replace "@...@" zones with "<code>" tags.
            MatchEvaluator me = new MatchEvaluator(CodeFormatMatchEvaluator);

            line = CodeBlockRegex.Replace(line, me);

            // Encode the contents of the "<code>" tags so that we don't
            // generate formatting out of it.
            line = NoTextileEncoder.EncodeNoTextileZones(line,
                                                         @"(?<=(^|\s)<code(" + Globals.HtmlAttributesPattern + @")>)",
                                                         @"(?=</code>)");
            return(line);
        }
Exemplo n.º 5
0
 public override string ModifyLine(string line)
 {
     // Replace "@...@" zones with "<code>" tags.
     MatchEvaluator me = new MatchEvaluator(CodeFormatMatchEvaluator);
     line = Regex.Replace(line,
                           @"(?<before>^|([\s\([{]))" +    // before
                            "@" +
                           @"(\|(?<lang>\w+)\|)?" +        // lang
                            "(?<code>[^@]+)" +              // code
                            "@" +
                           @"(?<after>$|([\]}])|(?=" + Globals.PunctuationPattern + @"{1,2}|\s|$))",  // after
                         me);
     // Encode the contents of the "<code>" tags so that we don't
     // generate formatting out of it.
     line = NoTextileEncoder.EncodeNoTextileZones(line,
                           @"(?<=(^|\s)<code(" + Globals.HtmlAttributesPattern + @")>)",
                           @"(?=</code>)");
     return line;
 }
 internal static string InnerModifyLine(string line)
 {
     line = NoTextileEncoder.EncodeNoTextileZones(line, @"(?<=^|\s)<notextile>", @"</notextile>(?=(\s|$)?)");
     line = NoTextileEncoder.EncodeNoTextileZones(line, @"==", @"==");
     return(line);
 }
 public override string ModifyLine(string line)
 {
     line = NoTextileEncoder.EncodeNoTextileZones(line, @"(?<=^|\s)<notextile>", @"</notextile>(?=(\s|$)?)");
     line = NoTextileEncoder.EncodeNoTextileZones(line, @"==", @"==");
     return(line);
 }