Padding with custom char fails
retorquere opened this issue · comments
Emiliano Heyns commented
Unless I'm misunderstanding the docs, this should work, but it errors out with
SyntaxError: [sprintf] unexpected placeholder
at Function.sprintf.parse (/Users/emile/github/better-bibtex/node_modules/sprintf-js/src/sprintf.js:164:23)
at sprintf (/Users/emile/github/better-bibtex/node_modules/sprintf-js/src/sprintf.js:19:34)
at Object. (/Users/emile/github/better-bibtex/ext.js:5:13)
const sprintf = require('sprintf-js').sprintf
var a = {
name: 'a',
}
console.log(sprintf("Hello %'a2(name)s", a))
Emiliano Heyns commented
Never mind, this works:
const sprintf = require('sprintf-js').sprintf
var a = { a: 'a' }
console.log(sprintf("Hello %(a)'a2s", a))