jsperf/jsperf.com

View on GitHub
templates/helpers/addCode.js

Summary

Maintainability
A
0 mins
Test Coverage
var Handlebars = require('handlebars');

module.exports = function (str) {
  return new Handlebars.SafeString(str.replace(/`([^`]*)`/g, '<code>$1</code>'));
};