Task #2581
Feature #2560: Enable link update of a "link updated" book
Add data-source attribute in the existing 'anchor tags'/'lurls' in the document during overwrite a book.
Start date:
08/05/2022
Due date:
08/05/2022
% Done:
100%
Estimated time:
2.00 h
Description
data-source will contain o-url of the internal link from new document
Scheme:
updateAllInternalLinksWithDataSource(oldDocContent, newDocContent): - newHrefLinks = getAllLinks(newDocContent); - oldHrefLinks = getAllLinks(oldDocContent); - for(i=0; i < oldHrefLinks.size(); i++): - oldHrefLink = oldHrefLinks[i]; - if(oldHrefLink.startsWith('document/'): - oldHrefLink.setAttribute('data-source', newHrefLinks[i]);