Exemplo n.º 1
0
 public override void Parse(List <TextFragment> fragments, TransformationData data)
 {
     ParseElements(data, fragments, new EMMarkdownAndHTMLTagsParser(GetLocation));
     ParseElements(data, fragments, EMHeader.GetParser());
     ParseElements(data, fragments, EMInclude.GetParser());
     ParseElements(data, fragments, EMTOCInline.GetParser());
     ParseElements(data, fragments, EMBookmark.GetParser());
     ParseElements(data, fragments, EMHorizontalRule.GetParser());
     ParseElements(data, fragments, EMList.GetParser());
     ParseElements(data, fragments, EMTable.GetParser());
     ParseElements(data, fragments, EMCodeBlock.GetParser());
     ParseElements(data, fragments, EMBlockQuotes.GetParser());
     ParseElements(data, fragments, EMParagraph.GetParser());
 }
Exemplo n.º 2
0
        private static EMElement Create(Match match, EMDocument doc, EMElementOrigin origin, EMElement parent, TransformationData data)
        {
            var bqTextGroup = match.Groups[1];
            var bqText = bqTextGroup.Value;

            bqText = Regex.Replace(bqText, @"^[ ]*>[ ]?", "", RegexOptions.Multiline);       // trim one level of quoting
            bqText = Regex.Replace(bqText, @"^[ ]+$", "", RegexOptions.Multiline);           // trim whitespace-only lines

            var bq = new EMBlockQuotes(doc, origin, parent);

            bq.Elements.Parse(origin.Start + bqTextGroup.Index, bqText, data);

            return bq;
        }
        private static EMElement Create(Match match, EMDocument doc, EMElementOrigin origin, EMElement parent, TransformationData data)
        {
            var bqTextGroup = match.Groups[1];
            var bqText      = bqTextGroup.Value;

            bqText = Regex.Replace(bqText, @"^[ ]*>[ ]?", "", RegexOptions.Multiline);       // trim one level of quoting
            bqText = Regex.Replace(bqText, @"^[ ]+$", "", RegexOptions.Multiline);           // trim whitespace-only lines

            var bq = new EMBlockQuotes(doc, origin, parent);

            bq.Elements.Parse(origin.Start + bqTextGroup.Index, bqText, data);

            return(bq);
        }