Exemple #1
0
        private static void HandleBreak(ConverterContext context)
        {
            context.PopUntil <Paragraph>();
            var sentence = new Sentence();

            context.Add(sentence);
            context.AddStack.Push(sentence);
        }
Exemple #2
0
        private static void HandleStrong(ConverterContext context)
        {
            if (!context.Enumerable.Current.IsOpening)
            {
                throw new InvalidOperationException("Closing strong without opening");
            }

            var text = TextUntil(context, InlineTag.Strong);

            context.Add(new Emphasis(text)
            {
                Level = EmphasisLevel.Strong
            });
        }
Exemple #3
0
        public static void HandleEmphasis(ConverterContext context)
        {
            if (!context.Enumerable.Current.IsOpening)
            {
                throw new InvalidOperationException("Closing emphasis without opening");
            }

            var text = TextUntil(context, InlineTag.Emphasis);

            context.Add(new Prosody
            {
                Elements = new List <ISsml> {
                    new PlainText(text)
                },
                Pitch = ProsodyPitch.ExtraHigh
            });
        }
Exemple #4
0
 private static void HandleText(ConverterContext context)
 {
     context.Add(new PlainText(context.Enumerable.Current.Inline.LiteralContent));
 }