Skip to content

Conversation

zeeZ
Copy link

@zeeZ zeeZ commented Mar 29, 2024

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

When run with HUGO_UGLYURLS=true, the position count is wrong and a comma is missing between array elements, causing errors during minification.
This PR decouples position counting from (potentially skipped) bc_list array indices and length, making it slightly more robust.

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

Also fixes #1441 and its reproducer, which shows the same behavior

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • 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.

@zeeZ zeeZ force-pushed the schema-json-comma branch from 5cac2b5 to 05ba5a7 Compare March 29, 2024 17:50
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

akkuman added a commit to akkuman/akkuman.github.io that referenced this pull request Oct 12, 2024
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.

[BUG] Minified build errors with: expected comma character or an array or object ending on line...
1 participant