이 문자열 변수는 js로 정의됩니다. 내가 ES6이 점을 변환 할 때 내가 +를 사용하여 다음 행으로 그것을 깰 줄에 125 개 문자를 초과 들어Es6 서식 오류?
bodycontent = 'Hello ' + studentName + '%0D%0AThe course ' + courseName
+ ' is using the TEAMMATES System to collect feedback.%0D%'
+ '0ATo \'join\' the course, please go to this Web address: '
+ encodeURIComponent(uri) + '%0D%0A*If prompted to log in, '
+ 'use your Googleaccount to log in. If you do not '
+ 'have a Google account, please create one from the '
+ encodeURIComponent('https://accounts.google.com/NewAccount')
+ '%0D%0A*The above link is unique to you. Please do not '
+ 'share it with your classmates.%0D%0ANote that If you '
+ 'wish to access TEAMMATES without using your Googleaccount, '
+ 'you do not need to \'join\' the course as instructed '
+ 'above. You will still be able to submit/view feedback '
+ 'by following the instructions sent to you by TEAMMATES at the '
+ 'appropriate times. However, we recommend joining the courseusing '
+ 'your Google account, because it gives you more convenient '
+ 'access to all your feedback stored in TEAMMATES.%0D%0A%0D%0A'
+ 'If you encounter any problems when using the system, you can '
+ 'email TEAMMATES support team at [email protected]%0D%0A%0D%0A'
+ 'Regards,%0D%0ATEAMMATES Team.';
이제 문제입니다.
bodycontent = `Hello ${studentName}%0D%0AThe following feedback session is ${status}%0D%0A`
+ `Course: [${Id}]${courseName}%0D%0AFeedback Session Name: ${Id}%0D%0A`
+ `The link of the feedback for the above session, please go to this Web `
+ `address: ${encodeURIComponent(uri)}%0D%0A*The above link is unique to you.`
+ `Please do not share it with others.%0D%0A%0D%0AIf you encounter any problems`
+ `when using the system, you can email TEAMMATES support team at [email protected]%0D%0A%0D%0ARegards,%0D%0ATEAMMATES Team.`;
이렇게하면 변수를 포함하지 않는 줄마다 "문자열에 작은 따옴표를 사용해야합니다"라는 오류 메시지가 표시됩니다.
또한
가bodycontent = `Hello ${studentName}%0D%0AThe following feedback session is ${status}%0D%0A
Course: [${Id}]${courseName}%0D%0AFeedback Session Name: ${Id}%0D%0A
The link of the feedback for the above session, please go to this Web
address: ${encodeURIComponent(uri)}%0D%0A*The above link is unique to you.`
......
그러나 문제는 내가 얻고있다 "\ n을"내가 원하지 않는 내 문자열에서 개행의 추가는 친절하게 휴식을 나에게 효율적인 방법을 말해이 같은 라인을 깰 수 내 문자열에 \ n 추가하지 않고 행.