Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit 046c15c breaks line wrapping on my site #932

Open
cpdohert opened this issue Sep 24, 2024 · 3 comments
Open

Commit 046c15c breaks line wrapping on my site #932

cpdohert opened this issue Sep 24, 2024 · 3 comments

Comments

@cpdohert
Copy link

Describe the problem:

Commit 046c15c creates line breaks in the rendered output where the line ends in the raw Markdown, rather than flowing the rendered paragraph until the double newlines creating the end of the paragraph in the raw Markdown.

Steps to reproduce:

  1. Create a content page with sample text but end text lines with a single newline at, for instance, column 25. End paragraphs with two newlines, creating a blank line between markdown paragraphs.
  2. hugo server
  3. cd themes/hugo-coder
  4. git checkout 3344e09
  5. Observe correct paragraph reflow in default rendering and as window is resized
  6. git checkout 046c15c
  7. git reset --hard HEAD
  8. Observe lines in content pages now break exactly where the line ends in the raw Markdown rather than reflowing

Observed Results:

  • What happened?
    • Line breaks were inserted in the rendered text where the line breaks in the raw Markdown
  • What did you expect to happen?
    • Complete paragraph reflow until the end of the Markdown paragraph, as per commit 3344e09

This can be reproduced in the exampleSite as well, so I doubt it's a configuration setting specific to my site. All of the content pages in the exampleSite have paragraphs that are one single line of text in the original Markdown, regardless of line length, so this bug isn't immediately apparent.

For readability and portability all my Markdown files end lines at 80 columns, and this bug completely prangs up the rendering of my sites.

The rendered HTML appears identical in commits 3344e09 and 046c15c so it's likely a CSS error.

@jirijakes
Copy link

Workaround when using hugo mod:

hugo mod get github.com/luizdepra/hugo-coder@3344e09

milesdai added a commit to milesdai/milesdai.github.io that referenced this issue Jan 3, 2025
Pin Coder theme submodule to commit 3344e09 since the subsequent commit
(046c15c) introduces a regression that causes a single newline in the
markdown to also be rendered as a newline in the website.
luizdepra/hugo-coder#932 must be resolved before updating to a newer
version.
@falkoin
Copy link

falkoin commented Jan 25, 2025

If you remove white-space: pre-wrap; from _base.scss it resolves the issue, but I don't know how this affects the solution, which was introduced with this commit.

@luizdepra
Copy link
Owner

I just removed these rules at b2eea1a.
It should be working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants