Skip to content

Commit c663a33

Browse files
committed
Update bcp-47-normalize
1 parent d776353 commit c663a33

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/atom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import {URL} from 'url'
1111
import {u} from 'unist-builder'
1212
import {x} from 'xastscript'
13-
import bcp47 from 'bcp-47-normalize'
13+
import {bcp47Normalize as normalize} from 'bcp-47-normalize'
1414
import {toAuthor, toDate} from './util.js'
1515

1616
/**
@@ -183,7 +183,7 @@ export function atom(channel, data) {
183183
'feed',
184184
{
185185
xmlns: 'http://www.w3.org/2005/Atom',
186-
'xml:lang': meta.lang ? bcp47(meta.lang) : undefined
186+
'xml:lang': meta.lang ? normalize(meta.lang) : undefined
187187
},
188188
items
189189
)

lib/rss.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import {URL} from 'url'
1111
import {u} from 'unist-builder'
1212
import {x} from 'xastscript'
13-
import bcp47 from 'bcp-47-normalize'
13+
import {bcp47Normalize as normalize} from 'bcp-47-normalize'
1414
import {toAuthor, toDate} from './util.js'
1515

1616
/**
@@ -71,7 +71,7 @@ export function rss(channel, data) {
7171
}
7272

7373
if (meta.lang) {
74-
lang = bcp47(meta.lang)
74+
lang = normalize(meta.lang)
7575
items.push(x('language', lang), x('dc:language', lang))
7676
}
7777

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
],
3737
"dependencies": {
3838
"@types/xast": "^1.0.0",
39-
"bcp-47-normalize": "^1.0.0",
39+
"bcp-47-normalize": "^2.0.0",
4040
"unist-builder": "^3.0.0",
4141
"xastscript": "^3.0.0"
4242
},

0 commit comments

Comments
 (0)