MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / build

Function build

static/scripts/markitup/jquery.markitup.js:233–251  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

231
232 // build block to insert
233 function build(string) {
234 openWith = prepare(clicked.openWith);
235 placeHolder = prepare(clicked.placeHolder);
236 replaceWith = prepare(clicked.replaceWith);
237 closeWith = prepare(clicked.closeWith);
238 if (replaceWith !== "") {
239 block = openWith + replaceWith + closeWith;
240 } else if (selection === '' && placeHolder !== '') {
241 block = openWith + placeHolder + closeWith;
242 } else {
243 block = openWith + (string||selection) + closeWith;
244 }
245 return { block:block,
246 openWith:openWith,
247 replaceWith:replaceWith,
248 placeHolder:placeHolder,
249 closeWith:closeWith
250 };
251 }
252
253 // define markup to insert
254 function markup(button) {

Callers 1

markupFunction · 0.85

Calls 1

prepareFunction · 0.85

Tested by

no test coverage detected