Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues at printing some symbols #7

Open
touxstone opened this issue May 7, 2020 · 1 comment
Open

Issues at printing some symbols #7

touxstone opened this issue May 7, 2020 · 1 comment

Comments

@touxstone
Copy link

touxstone commented May 7, 2020

Hi, I was testing this gorgeous contribution (I knew about this package from playing with js-comint on javascript buffers) and I've just found issues when printing, for instance, in the example below, the pound simbol £ though only when working on EMACS. Trying the same example with tsun on the command line it renders as expected. Any help or clue ??. I'd appreciate it.

    function dctoVip(x) {
        return x > 20 ? `Yes!! you got 20% OFF, so only have to pay £${x - x * 0.20}` :
            `Thanks very much! Shop for additional £{20 - x} and you will get 20% discount??`
    }
// testing for instance a shopping of £15
    console.log(dctoVip(15))
//output I got 
// >> Thanks very much! Shop for additional 5 and you will get 20% discount

output expected:

Thanks very much! Shop for additional £5 and you will get 20% discount

@josteink
Copy link
Member

josteink commented May 14, 2020

Hey there and thanks for the report.

I honestly don't use this mode that much anymore, and have mostly moved to unit-testing to check correct understanding of smaller bits of code.

That said, are you sure your sample is correct?

This looks like a typo:

`Yes!! you got 20% OFF, so only have to pay £${x - x * 0.20}`

vs

`Thanks very much! Shop for additional £{20 - x} and you will get 20% discount??`

Notice one has £$ while the other only has £. Is this intentional? Are you missing a $ there? If you are, that is a TypeScript syntax-error as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants