Esempio n. 1
0
        IEnumerable <ITagSpan <ClassificationTag> > GetClassificationTagSpans(MarkdownHeader header)
        {
            switch (header.Level)
            {
            case 1:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H1));

                break;

            case 2:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H2));

                break;

            case 3:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H3));

                break;

            case 4:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H4));

                break;

            case 5:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H5));

                break;

            case 6:
                yield return(MakeClassificationTagSpan(header.Span, ClassificationTypes.H6));

                break;
            }
        }
Esempio n. 2
0
        IEnumerable <ITagSpan <IntraTextAdornmentTag> > GetIntraTextAdornmentTagSpans(MarkdownHeader header)
        {
            if (!_hideDelimiters)
            {
                yield break;
            }

            yield return(MakeIntraTextAdornmentTagSpan(header.DelimiterSpan, () => new UIElement()));
        }