Skip to content

Remove extraneous space in toc.html#488

Merged
adityatelange merged 1 commit intoadityatelange:masterfrom
lambdapioneer:patch-1
Aug 3, 2021
Merged

Remove extraneous space in toc.html#488
adityatelange merged 1 commit intoadityatelange:masterfrom
lambdapioneer:patch-1

Conversation

@lambdapioneer
Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

In some version of Hugo (e.g. the default one at Netlify) the extraneous space causes the following error:

8:12:29 PM: $ hugo
8:12:29 PM: Error: "/opt/build/repo/themes/PaperMod/layouts/partials/toc.html:71:1": parse failed: template: partials/toc.html:71: illegal number syntax: "-"

This PR removes the extraneous space.

Was the change discussed in an issue or in the Discussions before?

Yes, in #426 - there the solution was to update the version of Hugo.

However, this is a low risk change and it makes the onboarding more pleasant for new users as they do not need extra configuration. Also, the error message does not guide them towards a possible solution (i.e. setting the Hugo version).

Test plan

I tested with unmodified version and observed the error shown above. Then I tested the modified version and the error no longer appeared.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 2, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Copy Markdown
Owner

@adityatelange adityatelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lambdapioneer 👍

@adityatelange adityatelange merged commit 81fcd8f into adityatelange:master Aug 3, 2021
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
Fixes errors in lower version of Hugo
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

Successfully merging this pull request may close these issues.

2 participants