-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add white-space: nowrap;
to inline code (single backticks) snippets
#509
Comments
In the specific scenario you presented, preventing the For example, on a mobile device, it would be easy to configure an inline code block that was wider than the viewport. This would cause horizontal scrolling in the browser as the extra long string would not wrap. The following sample creates an extra long inline code block and the screen capture below demonstrates how the page width is blown out.
Screen.Recording.2023-03-03.at.11.17.24.PM.movThere are options if you would like to override the default behaviour of Retype to force Option 1Add a global css override. Within your project's <style>
main code {
white-space: nowrap;
}
</style> Option 2Manually override a specific inline code sample by appending Using your original sample, the override would be added as follows:
Option 3A syntactic simplification of Option 2 by using Templating within Retype to create a global variable to be applied selectively. Within your project's data:
nowrap: '{style="white-space: nowrap;"}' Then in your content, you manually apply the
I wouldn't be in support of forcing Hope this helps. |
Nice. Option 3 is very clean. Couldn't find it in the docs searched for |
@geoffreymcgill - adding this works locally without a problem, but breaks GitHub Actions build: https://github.com/DannyBen/bashly-book/actions/runs/4329837973/jobs/7560660259 Just to be sure its not something unrelated, I removed it, and it succeeded, and added it again and it fails. |
Confirmed. I was able to reproduce the error. It should work, so there is a defect somewhere. We are trying to find the problem. For the moment, I don't have a work-around if you are using the See also |
Its fine - I used option two of inline styling for now. When it is fixed, I will switch to the cleaner data syntax. |
We found and fixed the bug. It was not obviously reproducible locally because the Unfortunately, there is no work-around, but we are trying to get Retype v3 released as soon as possible and will include this fix. |
I believe any string inside single backticks should be set with
white-space: nowrap;
CSS directive. Otherwise, it looks like a bug when it breaks.Actual
Expected
I know I can obtain this by placing strategic newlines (double space endings), but this happens in other situations where I have less control over (e.g. in table cells).
The text was updated successfully, but these errors were encountered: