protected override void Write(SpeeDataRenderer renderer, HeadingBlock headingBlock) { renderer.WriteStartParagraph(); renderer.WriteStartElement("Fontface"); renderer.WriteAttribute("fontfamily", headingBlock.Level <= 1 ? "head1" : "head2"); renderer.WriteStartElement("B"); renderer.WriteItems(headingBlock); renderer.WriteEndElement(); renderer.WriteEndElement(); renderer.WriteEndParagraph(); }
private static bool WriteSpan(SpeeDataRenderer renderer, EmphasisInline span) { // Links: // - https://github.com/lunet-io/markdig/blob/master/src/Markdig.Tests/Specs/EmphasisExtraSpecs.md // - http://commonmark.org/help/ switch (span.DelimiterChar) { case '*': case '_': renderer.WriteStartElement(span.DelimiterCount == 2 ? "B" : "I"); return(true); case '~': //if (span.IsDouble) return(false); // StrikeThrough -> Durchgestrichen //else //{ // renderer.WriteStartElement("Sub"); // Subscript -> Tiefgestellt // return true; //} case '^': //if (span.IsDouble) return(false); // free //else //{ // renderer.WriteStartElement("Sup"); // Superscript -> Hochgestellt // return true; //} case '+': if (span.DelimiterCount == 2) { renderer.WriteStartElement("U"); // Underlined -> Unterstrichen return(true); } else { return(false); // free } case '=': // Marked renderer.WriteStartElement("Color"); renderer.WriteAttribute("name", "marked"); return(true); default: return(false); } } // proc WriteSpan