https://github.com/showdownjs/showdown/からダウンロードできる showdown.js を使用しています
質問は、特定のフォーマットのみを許可しようとしているのですか? たとえば、太字の書式設定のみが許可され、残りは変換されず、書式設定は破棄されます。
以下のMarkdown Expressionであるテキストを書いている場合
"Text attributes _italic_, *italic*, __bold__, **bold**, `monospace`."
上記の出力は以下になります
<p>Text attributes <em>italic</em>, <em>italic</em>, <strong>bold</strong>, <strong>bold</strong>, <code>monospace</code>.
変換後。今私が欲しいのは、変換時に太字の式だけを変換し、残りの式を破棄する必要があることです。
以下のコードを使用して、マークダウン式を以下の通常のテキストに変換しています
var converter = new showdown.Converter(),
//Converting the response received in to html format
html = converter.makeHtml("Text attributes _italic_, *italic*, __bold__, **bold**, `monospace`.");
ありがとうございました!