Skip to content

Commit bdbce5c

Browse files
🐛 fix line breaks not working in translated version of the content (#384)
1 parent 0125271 commit bdbce5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/helpers/translation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ const logger = require('./logger')
44
const key = process.env.CLOUD_TRANSLATION_API_KEY || ''
55
const detectApiUrl = new URL('https://translation.googleapis.com/language/translate/v2/detect')
66
detectApiUrl.searchParams.append('key', key)
7-
const translationApiUrl = new URL('https://translation.googleapis.com/language/translate/v2')
7+
const translationApiUrl = new URL(
8+
'https://translation.googleapis.com/language/translate/v2?format=text'
9+
)
810
translationApiUrl.searchParams.append('key', key)
911

1012
const detectLanguage = async text => {

0 commit comments

Comments
 (0)