Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [IOCOM-2040] Handling of code and pre html blocks in old markdown (
#6652) ## Short description This PR fixes a problem with the existing markdown component, where text was overflowing or being cut. |Horizontal overflow<br/>Android|Horizontal overflow<br/>iOS| |-|-| ||| |Vertical cut<br/>Android|Vertical cut<br/>iOS| |-|-| ||| |Fixed<br/>Android|Fixed<br/>iOS| |-|-| |a|b| ||| ## List of changes proposed in this pull request The problem arises when the input markdown string contains: - a tab character (UTF-8), after a newline - two or more subsequent newlines with four blank spaces before any text Such sequences causes the generated html to wrap the text into a `<pre><code>text here</code></pre>` block, that causes either horizontal overflow or vertical cutting (or both). To fix such problem, a custom styling for `pre` and `code` has been added to the markdown's CSS in order to render such blocks as a standard HTML paragraph. ## How to test Using the io-dev-api-server, generate a message containing above cases and check that it is rendered properly. --------- Co-authored-by: Martino Cesari Tomba <[email protected]>
- Loading branch information