Take the following HTML: <ruby>振<rt>ふ</rt>り<rt></rt>仮<rt>が</rt>名<rt>な</rt></ruby>
振り仮名
The empty <rt></rt> is very important here, as this is what results in proper placement of the furigana above each character. The empty <rt></rt> after り indicates to not place any furigana above this character. As you can see above, this works as expected.
However, when I quote that text (not full post quote), the resulting HTML is this: <ruby>振<rt>ふ</rt>り仮<rt>が</rt>名<rt>な</rt></ruby>
振り仮名
Because the empty <rt></rt> was removed, the が now appears above both り and 仮 instead of just above 仮 as in the original text. This is because it thinks the が is meant to be placed above all preceding characters since the last rt tag.
If possible, could you update quoting rt HTML tags so that they are copied over even when empty?
長さはほぼ同じですね。実は、最初のものにある rb のアプローチは見たことがありません。一般的にそのバージョンが使われているのかどうかもわかりません。ただ、引用としては正しく機能していますね。でも、まだ気になります。引用する際に空の HTML タグがそのままコピーされてしまうような他のケースはありますか?
私は既存の markdown-it プラグインをラップする Discourse プラグインを構築していて、そのプラグインは rb + rt のアプローチではなく、従来の rt のアプローチに従っています。残念ながら、この特定のケースでの引用は悪い HTML を生成することになります。もちろん、人が手動で ruby HTML を記述した場合にも起こり得ます。私はたまたまこのプラグインから気づいたのです。