mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 17:36:14 -04:00
Changeset: Migrate from OpIter
to deserializeOps()
This commit is contained in:
parent
0eca0251f2
commit
89fe40e080
16 changed files with 147 additions and 179 deletions
|
@ -670,9 +670,8 @@ const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
|||
|
||||
exports.getLineHTMLForExport = async (hookName, context) => {
|
||||
if (!context.attribLine) return;
|
||||
const opIter = Changeset.opIterator(context.attribLine);
|
||||
if (!opIter.hasNext()) return;
|
||||
const op = opIter.next();
|
||||
const [op] = Changeset.deserializeOps(context.attribLine);
|
||||
if (op == null) return;
|
||||
const heading = AttributeMap.fromString(op.attribs, context.apool).get('heading');
|
||||
if (!heading) return;
|
||||
context.lineContent = `<${heading}>${context.lineContent}</${heading}>`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue