kotlinx.html icon indicating copy to clipboard operation
kotlinx.html copied to clipboard

<del> tag adds a new line before and after using it

Open manuelvicnt opened this issue 5 years ago • 2 comments

When using the del tag DSL, it adds a new line before and after using it.

Example from Dokka:

<pre class="api-signature no-pretty-print"><span class="keyword">abstract</span> <span class="keyword">fun </span>
        <del><span class="identifier">hasText</span></del>
<span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></pre>

Screenshot from 2019-03-29 13-36-28

Expected output: <del> should be inlined

 <pre class="api-signature no-pretty-print"><span class="keyword">abstract</span> <span class="keyword">fun </span><del><span class="identifier">hasText</span></del><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></pre>

manuelvicnt avatar Mar 29 '19 12:03 manuelvicnt

Hitting this as well. It should be added to the list of inline tags here:

  • https://github.com/Kotlin/kotlinx.html/blob/f1b51c6d4ffff6b05fb3e647125ca6b2fb203fd1/buildSrc/src/main/kotlin/kotlinx/html/generate/tagsgen.kt#L536

@e5l Can you fix this? Should be absolutely trivial. Without it any layout with <del> is messed up with the extra space.

axelfontaine avatar Feb 28 '24 17:02 axelfontaine

Hey, sure @axelfontaine! Let me take a look

e5l avatar Feb 29 '24 07:02 e5l