Skip to content

Commit

Permalink
i18n: bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ntzyz committed Mar 4, 2019
1 parent e45eeb5 commit a5ffa57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function render (posts, options) {
}

// 获取所有的语言
const langs = post.content.match(/\<multi\-lang\ lang=\"([^\"]+?)\">/ig).map(matched => {
const langs = [...new Set(post.content.match(/\<multi\-lang\ lang=\"([^\"]+?)\">/ig))].map(matched => {
const lang = matched.match(/\<multi\-lang\ lang=\"([^\"]+?)\">/i)[1];
return {
name: lang,
Expand Down

0 comments on commit a5ffa57

Please sign in to comment.