Pad: Delete dead `ace_getFormattedCode()`
parent
1db509ba23
commit
5d39a57507
|
@ -18,7 +18,6 @@ Returns the `rep` object.
|
|||
## editorInfo.ace_setOnKeyDown(?)
|
||||
## editorInfo.ace_setNotifyDirty(?)
|
||||
## editorInfo.ace_dispose(?)
|
||||
## editorInfo.ace_getFormattedCode(?)
|
||||
## editorInfo.ace_setEditable(bool)
|
||||
## editorInfo.ace_execCommand(?)
|
||||
## editorInfo.ace_callWithAce(fn, callStack, normalize)
|
||||
|
|
|
@ -110,7 +110,6 @@ const Ace2Editor = function () {
|
|||
'importAText',
|
||||
'focus',
|
||||
'setEditable',
|
||||
'getFormattedCode',
|
||||
'setOnKeyPress',
|
||||
'setOnKeyDown',
|
||||
'setNotifyDirty',
|
||||
|
|
|
@ -586,25 +586,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
outsideNotifyDirty = handler;
|
||||
};
|
||||
|
||||
const getFormattedCode = () => {
|
||||
if (currentCallStack && !currentCallStack.domClean) {
|
||||
inCallStackIfNecessary('getFormattedCode', incorporateUserChanges);
|
||||
}
|
||||
const buf = [];
|
||||
if (rep.lines.length() > 0) {
|
||||
// should be the case, even for empty file
|
||||
let entry = rep.lines.atIndex(0);
|
||||
while (entry) {
|
||||
const domInfo = entry.domInfo;
|
||||
buf.push((domInfo && domInfo.getInnerHTML()) ||
|
||||
domline.processSpaces(domline.escapeHTML(entry.text), doesWrap) ||
|
||||
' ' /* empty line*/);
|
||||
entry = rep.lines.next(entry);
|
||||
}
|
||||
}
|
||||
return `<div class="syntax"><div>${buf.join('</div>\n<div>')}</div></div>`;
|
||||
};
|
||||
|
||||
const CMDS = {
|
||||
clearauthorship: (prompt) => {
|
||||
if ((!(rep.selStart && rep.selEnd)) || isCaret()) {
|
||||
|
@ -3304,7 +3285,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
editorInfo.ace_setOnKeyDown = setOnKeyDown;
|
||||
editorInfo.ace_setNotifyDirty = setNotifyDirty;
|
||||
editorInfo.ace_dispose = dispose;
|
||||
editorInfo.ace_getFormattedCode = getFormattedCode;
|
||||
editorInfo.ace_setEditable = setEditable;
|
||||
editorInfo.ace_execCommand = execCommand;
|
||||
editorInfo.ace_replaceRange = replaceRange;
|
||||
|
|
|
@ -224,7 +224,6 @@ domline.createDomLine = (nonEmpty, doesWrap, optBrowser, optDocument) => {
|
|||
};
|
||||
result.prepareForAdd = writeHTML;
|
||||
result.finishUpdate = writeHTML;
|
||||
result.getInnerHTML = () => curHTML || '';
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue