MCPcopy
hub / github.com/hedgedoc/hedgedoc / cloneAndRemoveDataAttr

Function cloneAndRemoveDataAttr

public/js/index.js:3694–3700  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

3692}
3693
3694function cloneAndRemoveDataAttr (el) {
3695 if (!el) return
3696 const rawEl = $(el).clone()
3697 rawEl.removeAttr('data-startline data-endline')
3698 rawEl.find('[data-startline]').removeAttr('data-startline data-endline')
3699 return rawEl[0]
3700}
3701
3702function copyAttribute (src, des, attr) {
3703 if (src && src.getAttribute(attr) && des) {

Callers 1

partialUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected