MCPcopy Index your code
hub / github.com/ether/etherpad / getPadLines

Function getPadLines

src/node/handler/PadMessageHandler.ts:1628–1642  ·  view source on GitHub ↗
(pad: PadType, revNum: number)

Source from the content-addressed store, hash-verified

1626 * https://github.com/ether/pad/blob/master/etherpad/src/etherpad/control/pad/pad_changeset_control.js#L263
1627 */
1628const getPadLines = async (pad: PadType, revNum: number) => {
1629 // get the atext
1630 let atext;
1631
1632 if (revNum >= 0) {
1633 atext = await pad.getInternalRevisionAText(revNum);
1634 } else {
1635 atext = makeAText('\n');
1636 }
1637
1638 return {
1639 textlines: splitTextLines(atext.text),
1640 alines: splitAttributionLines(atext.attribs, atext.text),
1641 };
1642};
1643
1644/**
1645 * Tries to rebuild the composePadChangeset function of the original Etherpad

Callers 1

getChangesetInfoFunction · 0.85

Calls 4

makeATextFunction · 0.90
splitTextLinesFunction · 0.90
splitAttributionLinesFunction · 0.90

Tested by

no test coverage detected