Skip to main content

Timeline for Prettier Pug Plugin

Current License: CC BY-SA 4.0

5 events
when toggle format what by license comment
Jan 21, 2020 at 6:58 comment added Shinigami You will receive the bounty if there is no better answer by 12:00 noon on Sunday
Jan 21, 2020 at 3:53 comment added woxxom 1) looks like a job for splice(), assuming we're talking about normal arrays as Uint8Array doesn't seem usable in your case after all due to being too rigid, 2) just in case, startsWith isn't the core of my regexp suggestion, it's only a minor thing for super trivial cases, but the dangerous thing is an unconstrained .* in the middle.
Jan 20, 2020 at 21:29 comment added Shinigami Thank you in advance for the suggestions. I'm currently still having problems with the Uint8Array + TextDecoder or arr.join('') tactic, I still don't know how to write retroactively into the existing result string. Example: github.com/prettier/plugin-pug/blob/… RegExp: I will check with jsPerf / Benchmark.js if multiple startsWith are faster than in example /^((v-bind|v-on|v-slot)?:|v-model|v-on|@).*/ Also I will learn some things about heuristics in V8 and node.js profiling
Jan 20, 2020 at 20:14 history edited woxxom CC BY-SA 4.0
added 110 characters in body
Jan 20, 2020 at 19:25 history answered woxxom CC BY-SA 4.0