Skip to content

Commit 8e3fd17

Browse files
authored
Fix entry tags in atom
Closes GH-2.
1 parent ea6548c commit 8e3fd17

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

lib/atom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function atom(channel, data) {
117117
if (datum.tags) {
118118
let offset = -1
119119
while (++offset < datum.tags.length) {
120-
items.push(x('category', {term: String(datum.tags[offset])}))
120+
children.push(x('category', {term: String(datum.tags[offset])}))
121121
}
122122
}
123123

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"remark-cli": "^11.0.0",
4848
"remark-preset-wooorm": "^9.0.0",
4949
"type-coverage": "^2.0.0",
50-
"typescript": "^4.0.0",
50+
"typescript": "^5.0.0",
5151
"xast-util-to-xml": "^3.0.0",
5252
"xo": "^0.53.0"
5353
},

test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,18 @@ test('atom', () => {
19981998
name: 'title',
19991999
attributes: {},
20002000
children: [{type: 'text', value: 'c'}]
2001+
},
2002+
{
2003+
type: 'element',
2004+
name: 'category',
2005+
attributes: {term: 'x'},
2006+
children: []
2007+
},
2008+
{
2009+
type: 'element',
2010+
name: 'category',
2011+
attributes: {term: 'y'},
2012+
children: []
20012013
}
20022014
]
20032015
},

0 commit comments

Comments
 (0)