Skip to content

fix wrong comma and position #1754

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

akkuman
Copy link

@akkuman akkuman commented Jun 11, 2025

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

before pr

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position":  1 ,
      "name": "Posts",
      "item": "https://example.com/post.html"
    }
    {
      "@type": "ListItem",
      "position":  1 ,
      "name": "Test Title",
      "item": "https://example.com/post/example.html"
    }
  ]
}
</script>

it will error on latest hugo(v0.147.8)

ERROR failed to process "\\post\\example.html": "C:\Users\ADMINI~1\AppData\Local\Temp\hugo-transform-error147489350:141:40": expected comma character or an array or object ending on line 141 and column 40
   12:     {
           ^

after pr

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position":  1 ,
      "name": "Posts",
      "item": "https://example.com/post.html"
    }
    ,
    {
      "@type": "ListItem",
      "position":  2 ,
      "name": "Test Title",
      "item": "https://example.com/post/example.html"
    }
  ]
}
</script>

it work on latest hugo(v0.147.8)

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

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.

Copy link

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.

1 participant