public void WriteTo(Html32TextWriter writer, List <string> classNames, ICssClassMapper classMapper) { foreach (char c in GetPrecedingPattern()) { writer.Write(c); } string[] spanClassNames; RegexParser.WriteSpanned(_name, writer, classNames, classMapper.TryGetNameClassNames(out spanClassNames) ? spanClassNames : null); foreach (char c in GetFollowingPattern()) { writer.Write(c); } }
public override void WriteTo(Html32TextWriter writer, List <string> classNames, ICssClassMapper classMapper) { writer.Write('{'); string[] spanClassNames; if (!classMapper.TryGetNameClassNames(out spanClassNames)) { spanClassNames = null; } RegexParser.WriteSpanned(MinValue, writer, classNames, spanClassNames); switch (Type) { case QuantifierType.Limited: writer.Write(","); RegexParser.WriteSpanned(MaxValue, writer, classNames, spanClassNames); break; case QuantifierType.MinRepeat: writer.Write(","); break; } writer.Write(IsLazy ? "}?" : "}"); }