Beispiel #1
0
        public override bool Match(InlineProcessor processor, ref StringSlice slice)
        {
            if (!ExtensionsHelper.MatchStart(ref slice, StartString, true))
            {
                return(false);
            }

            var text = ExtensionsHelper.TryGetStringBeforeChars(new char[] { '\"', '\n' }, ref slice);

            if (text == null || text.IndexOf('\n') != -1)
            {
                return(false);
            }

            if (!ExtensionsHelper.MatchStart(ref slice, EndString, true))
            {
                return(false);
            }

            processor.Inline = new NolocInline()
            {
                Text = text
            };

            return(true);
        }