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

Method shiftRight

external/.scrollLibs.js:14021–14024  ·  view source on GitHub ↗
(str = "", numSpaces = 1)

Source from the content-addressed store, hash-verified

14019 return str.replace(/\n\n+/g, "\n")
14020 }
14021 static shiftRight(str = "", numSpaces = 1) {
14022 let spaces = " ".repeat(numSpaces)
14023 return str.replace(/\n/g, `\n${spaces}`)
14024 }
14025 static getLinks(str = "") {
14026 const _re = new RegExp("(^|[ \t\r\n])((ftp|http|https):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))", "g")
14027 return str.match(_re) || []

Callers 1

shiftYoungerSibsRightMethod · 0.45

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected