Open hicham-barhoumi opened 9 years ago
ex * * strong * * strong2 * * => < strong >strong</ strong > </ strong >strong2</ strong > correct => < strong >strong</ strong > < strong >strong2</ strong >
namespace Tanka.Markdown.Html { public class OpenAndCloseRenderer<T> : ISpanRenderer where T : Span { protected virtual void Render(T span, StringBuilder builder) { if (_hasStarted) { builder.AppendFormat("</{0}>", _tag); _hasStarted = false;// this line fix the problem. return; } _hasStarted = true; builder.AppendFormat("<{0}>", _tag); } } }
Known issue at the moment. Will try to fix it at some point. Currently doing some overall refactoring to match the CommonMark spec.
ex * * strong * * strong2 * * => < strong >strong</ strong > </ strong >strong2</ strong > correct => < strong >strong</ strong > < strong >strong2</ strong >