MCPcopy Create free account
hub / github.com/breck7/scroll / setContentWithSubparticles

Method setContentWithSubparticles

external/.scrollLibs.js:17081–17096  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

17079 return this.parent.insertLineAndSubparticles(line, subparticles, this.index + 1)
17080 }
17081 setContentWithSubparticles(text) {
17082 // todo: deprecate
17083 if (!text.includes(this.particleBreakSymbol)) {
17084 this._clearSubparticles()
17085 return this.setContent(text)
17086 }
17087 const lines = text.split(this.particleBreakSymbolRegex)
17088 const firstLine = lines.shift()
17089 this.setContent(firstLine)
17090 // tood: cleanup.
17091 const remainingString = lines.join(this.particleBreakSymbol)
17092 const subparticles = new Particle(remainingString)
17093 if (!remainingString) subparticles.appendLine("")
17094 this.setSubparticles(subparticles)
17095 return this
17096 }
17097 setCue(cue) {
17098 return this.setAtom(0, cue)
17099 }

Callers 2

setContentMethod · 0.95
setMethod · 0.80

Calls 7

_clearSubparticlesMethod · 0.95
setContentMethod · 0.95
appendLineMethod · 0.95
setSubparticlesMethod · 0.95
splitMethod · 0.80
shiftMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected