public void InlineEndTag(IEndTagProperties tagInfo)
 {
     if (!_tqaDeletion)
     {
         _buffer.InlineEndTag(tagInfo);
     }
 }
        private ITagPair CreateTagPair(IStartTagProperties startTagProperties, IEndTagProperties endTagProperties,
                                       IEnumerable <IAbstractMarkupData> enclosedContent)
        {
            var tagPair = _itemFactory.CreateTagPair(startTagProperties, endTagProperties);

            foreach (var enclosedData in enclosedContent)
            {
                tagPair.Add(enclosedData);
            }

            return(tagPair);
        }
Example #3
0
        public override void InlineEndTag(IEndTagProperties tagInfo)
        {
            var originalText = tagInfo.GetMetaData(EmbeddedContentConstants.EmbeddedContentMetaKey);

            if (originalText != null)
            {
                var textInfo = PropertiesFactory.CreateTextProperties(originalText);
                Text(textInfo);
            }
            else
            {
                base.InlineEndTag(tagInfo);
            }
        }
        public override void InlineEndTag(IEndTagProperties tagInfo)
        {
            string originalText = tagInfo.GetMetaData(EmbeddedContentMetaKey);

            if (originalText != null)
            {
                ITextProperties textInfo = PropertiesFactory.CreateTextProperties(originalText);
                base.Text(textInfo);
            }
            else
            {
                base.InlineEndTag(tagInfo);
            }
        }
        private ITagPair CreateTagPair(XmlNode item)
        {
            // create the start and the end tag
            IStartTagProperties startTag = PropertiesFactory.CreateStartTagProperties(item.Name);

            #region "formatting"
            // apply character formatting to the start tag
            IFormattingGroup formattingGroup = PropertiesFactory.FormattingItemFactory.CreateFormatting();
            startTag.Formatting = new FormattingGroup();
            switch (item.Name)
            {
            case "b":
                formattingGroup.Add(new Bold(true));
                break;

            case "i":
                formattingGroup.Add(new Italic(true));
                break;

            case "u":
                formattingGroup.Add(new Underline(true));
                break;

            default:
                break;
            }
            startTag.Formatting = formattingGroup;
            #endregion

            startTag.DisplayText = item.Name;
            startTag.CanHide     = true;
            IEndTagProperties endTag = PropertiesFactory.CreateEndTagProperties(item.Name);
            endTag.DisplayText = item.Name;
            endTag.CanHide     = true;

            // create a tag pair out of the start and the end tag
            ITagPair tagPair = ItemFactory.CreateTagPair(startTag, endTag);

            // add text enclosed in the tag pair
            tagPair.Add(CreateText(item.InnerText));

            return(tagPair);
        }
        // this function outputs an opening or a closing <b> tag
        // and applies bold character formatting to the strings
        // that the tags enclose
        private void WriteInlineTag(string tagContent, bool isStart)
        {
            _fBold = new FormattingGroup();
            _fBold.Add(new Bold(true));

            if (isStart)
            {
                IStartTagProperties startTag = PropertiesFactory.CreateStartTagProperties(tagContent);
                startTag.DisplayText = "b";
                startTag.TagContent  = tagContent;
                startTag.Formatting  = _fBold;
                startTag.CanHide     = true;
                Output.InlineStartTag(startTag);
            }
            else
            {
                IEndTagProperties endTag = PropertiesFactory.CreateEndTagProperties(tagContent);
                endTag.DisplayText = "b";
                endTag.TagContent  = tagContent;
                endTag.CanHide     = true;
                Output.InlineEndTag(endTag);
            }
        }
Example #7
0
        private ITagPair CreateTagPair(ContentMatch match)
        {
            IStartTagProperties startProperties = _itemFactory.PropertiesFactory.CreateStartTagProperties(match.Value);

            startProperties.CanHide     = match.MatchRule.CanHide;
            startProperties.IsSoftBreak = match.MatchRule.IsSoftBreak;
            startProperties.IsWordStop  = match.MatchRule.IsWordStop;

            startProperties.DisplayText      = GetDisplayName(match.Value);
            startProperties.Formatting       = FormattingInflator.InflateFormatting(match.MatchRule.Formatting);
            startProperties.SegmentationHint = match.MatchRule.SegmentationHint;
            startProperties.SetMetaData(EmbeddedContentMetaKey, match.Value);

            IEndTagProperties endProperties = _itemFactory.PropertiesFactory.CreateEndTagProperties(match.Value);

            endProperties.CanHide     = match.MatchRule.CanHide;
            endProperties.IsSoftBreak = match.MatchRule.IsSoftBreak;
            endProperties.IsWordStop  = match.MatchRule.IsWordStop;
            endProperties.DisplayText = GetDisplayName(match.Value);
            endProperties.SetMetaData(EmbeddedContentMetaKey, match.Value);

            return(_itemFactory.CreateTagPair(startProperties, endProperties));
        }
 public override void InlineEndTag(IEndTagProperties tagInfo)
 {
     _targetFile.Write(tagInfo.TagContent);
 }
 public override void InlineEndTag(IEndTagProperties tagInfo)
 {
     _preview.Write(tagInfo.TagContent);
 }
Example #10
0
 protected ITagPair CreateTagPair(IStartTagProperties startTag, IEndTagProperties endTag)
 {
     return(ItemFactory.CreateTagPair(startTag, endTag));
 }
 public override void InlineEndTag(IEndTagProperties tag)
 {
     base.InlineEndTag(tag);
 }