internal IStartTagProperties CreateStartTagProperties(IPropertiesFactory factory, string tagContent, IMatchRule rule) { var startProperties = factory.CreateStartTagProperties(tagContent); ApplyInlineTagProperties(startProperties, rule); startProperties.DisplayText = GetDisplayName(tagContent); startProperties.Formatting = FormattingInflator.InflateFormatting(rule.Formatting); startProperties.SegmentationHint = rule.SegmentationHint; return(startProperties); }
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)); }