Skip to content

Text whitespace issues in Android app but not web #1126

Description

@edent

On v2.13.2 (189) from F-Droid - text in some <pre> elements runs together.

For example:

android text

It shows:

<pre itemscopeitemtype=https://schema.org/SoftwareSourceCodetranslate=no>

But it should be:

<pre itemscope itemtype=https://schema.org/SoftwareSourceCode translate=no>

The website mastodon.social renders it correctly:

correct spacing

The HTML content sent via the WordPress ActivityPub plugin is:

 <p>It takes some plaintext content. But how to get that content?  My code samples look like this:</p><pre><span class=\"tempest-highlight-language\"><img src=\"https://shkspr.mobi/blog/wp-content/plugins/tempest-highlight/svg/html.svg\" width=\"32\" height=\"32\" alt=\"\"><span> HTML</span></span><code>&lt;<span>pre</span> itemscope <span>itemtype</span>=https://schema.org/SoftwareSourceCode <span>translate</span>=no&gt;\n    &lt;<span>button</span> <span>onclick</span>=\"navigator.clipboard.writeText( this.parentNode.getElementsByTagName('code')[0].textContent );\"&gt;⧉&lt;/<span>button</span>&gt;\n    &lt;<span>span</span>&gt;\n        &lt;<span>img</span> alt <span>height</span>=32 <span>src</span>=html.svg <span>width</span>=32&gt;\n        &lt;<span>span</span> <span>itemprop</span>=programmingLanguage&gt; HTML&lt;/<span>span</span>&gt;\n    &lt;/<span>span</span>&gt;\n    &lt;<span>code</span> <span>itemprop</span>=text&gt;[…]&lt;/<span>code</span>&gt;\n&lt;/<span>pre</span>&gt;\n</code></pre>

Original post: https://shkspr.mobi/blog/2026/08/a-simple-copy-this-code-button-in-javascript/

I suspect something might be trimming the whitespace around <span> elements - but I'm not familiar enough with the codebase.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions