Inline code format cuts off long text when viewing page #1295

Closed
opened 2026-02-05 00:32:16 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @c0shea on GitHub (Aug 5, 2019).

Describe the bug
I have a list of text elements and some have an inline code snippet. If the inline code is longer than one visible line, the rest of the inline code text becomes invisible when editing and viewing the page. Unlike existing issue #1507, this happens when editing and viewing the page.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Paste in the following HTML into the page editor source code:
<li class="md-list-item">
<p class="md-end-block md-p"><span class="md-plain">Use for publicly accessible members in shared libraries like Core.Utilities using </span><span class=" md-link"><a spellcheck="false" href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/"><span class="md-plain">XML documentation comments</span></a></span><span class="md-plain">, e.g. </span><code><span spellcheck="false">/// &lt;summary&gt;Converts the &lt;paramref name="obj"/&gt; to the type specified by T. If the input type is not convertible to T, an exception will be thrown.&lt;/summary&gt;</span></code><span class="md-plain">.</span></p>
</li>
  1. Notice that the text is cut off after T, a

Expected behavior
The inline code should wrap to another line.

Screenshots
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.26.3
  • PHP Version: 7.3.8
  • Hosting Method (Nginx/Apache/Docker): IIS
Originally created by @c0shea on GitHub (Aug 5, 2019). **Describe the bug** I have a list of text elements and some have an inline code snippet. If the inline code is longer than one visible line, the rest of the inline code text becomes invisible when editing and viewing the page. Unlike existing issue #1507, this happens when editing and viewing the page. **Steps To Reproduce** Steps to reproduce the behavior: 1. Paste in the following HTML into the page editor source code: ``` <li class="md-list-item"> <p class="md-end-block md-p"><span class="md-plain">Use for publicly accessible members in shared libraries like Core.Utilities using </span><span class=" md-link"><a spellcheck="false" href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/"><span class="md-plain">XML documentation comments</span></a></span><span class="md-plain">, e.g. </span><code><span spellcheck="false">/// &lt;summary&gt;Converts the &lt;paramref name="obj"/&gt; to the type specified by T. If the input type is not convertible to T, an exception will be thrown.&lt;/summary&gt;</span></code><span class="md-plain">.</span></p> </li> ``` 2. Notice that the text is cut off after `T, a` **Expected behavior** The inline code should wrap to another line. **Screenshots** ![image](https://user-images.githubusercontent.com/17714002/62476149-7051a900-b774-11e9-82e8-f91aad970a46.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.26.3 - PHP Version: 7.3.8 - Hosting Method (Nginx/Apache/Docker): IIS
OVERLORD added the 🛠️ Enhancement🐛 Bug🎨 Design labels 2026-02-05 00:32:16 +03:00
Author
Owner

@james-geiger commented on GitHub (Aug 9, 2019):

@c0shea Is this what you were thinking the expected behavior would be?
Annotation 2019-08-09

@james-geiger commented on GitHub (Aug 9, 2019): @c0shea Is this what you were thinking the expected behavior would be? ![Annotation 2019-08-09](https://user-images.githubusercontent.com/15711820/62784428-1149a800-ba84-11e9-8ac3-d995c103c94e.png)
Author
Owner

@c0shea commented on GitHub (Aug 10, 2019):

@james-geiger I was expecting it to look like this:
image

@c0shea commented on GitHub (Aug 10, 2019): @james-geiger I was expecting it to look like this: ![image](https://user-images.githubusercontent.com/17714002/62815786-9320ec00-baeb-11e9-8fb0-6fa87f70b78c.png)
Author
Owner

@james-geiger commented on GitHub (Aug 13, 2019):

@c0shea Is there a reason one should have the line space visible and the other not?

My thought would be that inline code should not default to a multiline block—the functionality exists in the CodeMirror utility to wrap the line instead of scrolling it. Maybe this would be a better solution for the multi-line block. (See CodePen example.)

However, the bug you identified could be addressed by a PR that I have out to address other page display issues (#1581).

@james-geiger commented on GitHub (Aug 13, 2019): @c0shea Is there a reason one should have the line space visible and the other not? My thought would be that inline code should not default to a multiline block—the functionality exists in the CodeMirror utility to wrap the line instead of scrolling it. Maybe this would be a better solution for the multi-line block. ([See CodePen example.](https://codepen.io/james-geiger/pen/rNBOGOR)) However, the bug you identified could be addressed by a PR that I have out to address other page display issues (#1581).
Author
Owner

@c0shea commented on GitHub (Aug 14, 2019):

@james-geiger Yes, I think it should be consistent with similar functionality in other apps. GitHub, for example, shows line space and wraps the text when using inline code via a single backtick, whereas multiline code blocks are more similar to your CodePen example via triple backticks.

<p>This is a very long line of paragraph text that in the current code block style would not wrap and would instead cause the scroll bar to appear, or, in the case of inline code, run off the page.</p>

<p>This is a very long line of paragraph text that in the current code block style would not wrap and would instead cause the scroll bar to appear, or, in the case of inline code, run off the page.</p>
@c0shea commented on GitHub (Aug 14, 2019): @james-geiger Yes, I think it should be consistent with similar functionality in other apps. GitHub, for example, shows line space and wraps the text when using inline code via a single backtick, whereas multiline code blocks are more similar to your CodePen example via triple backticks. `<p>This is a very long line of paragraph text that in the current code block style would not wrap and would instead cause the scroll bar to appear, or, in the case of inline code, run off the page.</p>` ```html <p>This is a very long line of paragraph text that in the current code block style would not wrap and would instead cause the scroll bar to appear, or, in the case of inline code, run off the page.</p> ```
Author
Owner

@anginear commented on GitHub (Oct 10, 2019):

Is this issue fixed?

@anginear commented on GitHub (Oct 10, 2019): Is this issue fixed?
Author
Owner

@james-geiger commented on GitHub (Oct 10, 2019):

@utamav Fixed in PR c14611d but not yet merged.

@james-geiger commented on GitHub (Oct 10, 2019): @utamav Fixed in PR c14611d but not yet merged.
Author
Owner

@ssddanbrown commented on GitHub (Oct 17, 2019):

Fix has been merged as per #1587, will be in the next feature release. Therefore will close this off.

@ssddanbrown commented on GitHub (Oct 17, 2019): Fix has been merged as per #1587, will be in the next feature release. Therefore will close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1295