Skip to content
This repository

cursor position error with multibyte string descriptions #50

Open
danielking opened this Issue · 2 comments

2 participants

danielking
danielking

schema:

schema =
    properties:
        'username':
            description: '用户名'
            pattern: /^[a-zA-Z\s\-]+$/
            message: '用户名必须由字母、空格、横线组成'
            required: true
        'password':
            description: '密码'
            required: true
            hidden: true

result:

prompt: 用户名d
prompt: 密码:
{ username: 'd', password: 'a' }

and i have another question:
How to remove the prefix of each line such as "prompt: " "error: ". or place them with other strings

提示: 
错误: 
...

I seem to remember this being an issue with node.js core. I can't remember if it's been fixed or not. May I ask which version of node you are running?

As for the logger, it is actually a Winston.logger instance.

see: https://github.com/flatiron/prompt/blob/master/lib/prompt.js#L39

You can find documentation for Winston here : https://github.com/flatiron/winston

danielking

I'm using node 0.8.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.