Skip to content

Commit

Permalink
docs(transform.Unmarshal): match lang attribute to title language in …
Browse files Browse the repository at this point in the history
…examples
  • Loading branch information
kwentine authored Nov 20, 2024
1 parent 1985886 commit bda544c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/en/functions/transform/Unmarshal.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ Let's add a `lang` attribute to the `title` nodes of our RSS feed, and a namespa
<language>en-US</language>
<atom:link href="https://example.org/books/index.xml" rel="self" type="application/rss+xml" />
<item>
<title lang="fr">The Hunchback of Notre Dame</title>
<title lang="en">The Hunchback of Notre Dame</title>
<description>Written by Victor Hugo</description>
<isbn:number>9780140443530</isbn:number>
<link>https://example.org/books/the-hunchback-of-notre-dame/</link>
<pubDate>Mon, 09 Oct 2023 09:27:12 -0700</pubDate>
<guid>https://example.org/books/the-hunchback-of-notre-dame/</guid>
</item>
<item>
<title lang="en">Les Misérables</title>
<title lang="fr">Les Misérables</title>
<description>Written by Victor Hugo</description>
<isbn:number>9780451419439</isbn:number>
<link>https://example.org/books/les-miserables/</link>
Expand Down Expand Up @@ -266,7 +266,7 @@ Each item node looks like this:
"pubDate": "Mon, 09 Oct 2023 09:27:12 -0700",
"title": {
"#text": "The Hunchback of Notre Dame",
"-lang": "fr"
"-lang": "en"
}
}
```
Expand All @@ -290,8 +290,8 @@ Hugo renders this to:

```html
<ul>
<li>The Hunchback of Notre Dame (fr) 9780140443530</li>
<li>Les Misérables (en) 9780451419439</li>
<li>The Hunchback of Notre Dame (en) 9780140443530</li>
<li>Les Misérables (fr) 9780451419439</li>
</ul>
```

Expand Down

0 comments on commit bda544c

Please sign in to comment.