sindresorhus / multiline

Multiline strings in JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in chinese string

hueitan opened this issue · comments

When I console this

var welcome = this.yeoman + multiline.stripIndent(function () {/*
  _Project Name_ should not contain "jquery" or "js" and should be a unique ID not already in use at plugins.jquery.com.

  _Project title_ should be a human-readable title, and doesn't need to contain the word "jQuery", although it may.

  For example, a plugin titled "Awesome Plugin" might have the name "awesome-plugin".

  For more information, please see the following documentation: 你們好好好好厲害

  Naming Your Plugin      http://plugins.jquery.com/docs/names/
  Publishing Your Plugin  http://plugins.jquery.com/docs/publish/
  Package Manifest        http://plugins.jquery.com/docs/package-manifest/
*/});

the phrase

For more information, please see the following documentation: 你們好好好好厲害

is broken

screen shot 2014-05-02 at 9 51 01 am

Does it work in a normal string?

Yup, correctly in normal string. (a-z)

Can't reproduce. The following works fine for me:

console.log(ml.stripIndent(function(){/*
    lorem ipsum
        For more information, please see the following documentation: 你們好好好好厲害

    lorem ipsum
*/}));

I got this =(

console.log(multiline.stripIndent(function(){/*
     lorem ipsum 大家好 你好嗎
     lorem 你們好好好好厲害

     lorem ipsum
*/}));

screen shot 2014-05-02 at 10 20 02 am

I'd be happy to receive a failing unit test, but I'm pretty sure it's something with your system.