mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
Pad: Plumb author ID through mutation operations
This commit is contained in:
parent
5f60b3aab2
commit
3b8549342a
7 changed files with 35 additions and 30 deletions
|
@ -23,7 +23,7 @@ const jsdom = require('jsdom');
|
|||
const apiLogger = log4js.getLogger('ImportHtml');
|
||||
let processor;
|
||||
|
||||
exports.setPadHTML = async (pad, html) => {
|
||||
exports.setPadHTML = async (pad, html, authorId = '') => {
|
||||
if (processor == null) {
|
||||
const [{rehype}, {default: minifyWhitespace}] =
|
||||
await Promise.all([import('rehype'), import('rehype-minify-whitespace')]);
|
||||
|
@ -88,6 +88,6 @@ exports.setPadHTML = async (pad, html) => {
|
|||
const theChangeset = builder.toString();
|
||||
|
||||
apiLogger.debug(`The changeset: ${theChangeset}`);
|
||||
await pad.setText('\n');
|
||||
await pad.appendRevision(theChangeset);
|
||||
await pad.setText('\n', authorId);
|
||||
await pad.appendRevision(theChangeset, authorId);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue