Skip to content

Commit

Permalink
🐛 Add g: prefix in title and link of item
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasgusson committed Oct 16, 2023
1 parent 16c4560 commit 8b70acf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/simple/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-merchant-feed",
"version": "0.0.2",
"version": "0.0.3",
"description": "A simple library to generate Google Merchant XML Feed",
"author": "Douglas Gusson",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/xml-properties-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export type XmlPropertiesMapNodeItems = XmlPropertiesMapNode["items"];

export const xmlPropertiesMap: Record<keyof Product, XmlPropertiesMapNode> = {
id: { xmlName: "g:id" },
title: { xmlName: "title" },
title: { xmlName: "g:title" },
description: { xmlName: "g:description" },
link: { xmlName: "link" },
link: { xmlName: "g:link" },
imageLink: { xmlName: "g:image_link" },
mobileLink: { xmlName: "g:mobile_link" },
additionalImageLinks: {
Expand Down
2 changes: 1 addition & 1 deletion test/feed-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("FeedBuilder", () => {
expect(xml).toContain("<link>https://example.com/feed</link>");
expect(xml).toContain("<description>My Feed Description</description>");
expect(xml).toContain("<g:id>123</g:id>");
expect(xml).toContain("<title>My Product</title>");
expect(xml).toContain("<g:title>My Product</g:title>");
});
});
});

0 comments on commit 8b70acf

Please sign in to comment.