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

Remove extraneous space in toc.html #488

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

lambdapioneer
Copy link
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.

@sonarcloud
Copy link

sonarcloud 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
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.

None yet

2 participants