pinojs / quick-format-unescaped

Solves a problem with util.format
MIT License
17 stars 13 forks source link

Error parsing %s%s #18

Closed watson closed 5 years ago

watson commented 5 years ago

If two %s is next to each other, the last one will be ignored:

var format = require('quick-format-unescaped')
format('%s%s', 'foo', 'bar') // => "foo%s bar"
format('%s %s', 'foo', 'bar') // => "foo bar"
davidmarkclements commented 5 years ago

Hahaha .. woops

It's going to take me a week and a half to get to this - but in the meantime pr's welcome - also maybe @mcollina do you have bandwidth?

watson commented 5 years ago

I wanted to do a PR, but the tests are broken.... soooo 😅

mcollina commented 5 years ago

I would say fix the tests first.

We should really restructure this module so that we don't publish two modules from two branches, and the tests are verified by Travis.

I'm currently tied up for the next two weeks I'm afraid.

watson commented 5 years ago

I would say fix the tests first.

I would normally have done that, but I didn't have time. Hence I created this issue so the bug at least was reported as I didn't feel comfortable fixing this without a passing test suite.

mcollina commented 5 years ago

Tests are now passing @watson!