Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to preserve comments. #68

Open
rhandom opened this issue Feb 9, 2021 · 2 comments
Open

Option to preserve comments. #68

rhandom opened this issue Feb 9, 2021 · 2 comments

Comments

@rhandom
Copy link

rhandom commented Feb 9, 2021

In confluence it is possible to highlight a word, and add a comment. The resulting source then includes items like the following:

<ac:inline-comment-marker ac:ref="1e304c45-ee68-4685-9a4e-5285bd22f811">methods</ac:inline-comment-marker>

If the source passed to mark has that tag inserted (even if the content of the ac inline comment marker is modified) it will still show up on the resulting page. If the source mark does not have it, the mark comparison algorithms currently brick over the comments - thus preventing people from being able to comment on generated pages.

It is non-trivial to do a diff while still figuring out where to attach the comment - but it should be possible. If a section was modified beyond recognition the comment could be dropped, but if the diff still had the same text, in theory the item could still be inserted (again - non-trivial). At the very least it could add a dummy location that got inserted near the old location.

@guoweis-work
Copy link
Contributor

@kovetskiy i'm interested in taking on this one. What's your thought on this? Could you give me some pointers on how this might be addressed?

@kovetskiy
Copy link
Owner

@guoweis-outreach I'm not even sure where to start with such a feature. I'd check what modifications Confluence does to the final HTML that mark sends via API, I suppose Confluence doesn't output it on the page "as is". If it doesn't change the HTML (or at least not much) then we could try to diff and find where the comments are. But this is definitely not a trivial issue as @rhandom already pointed out.

Also, I believe we should check if Confluence has an API that exposes these comments since this ref seems like a unique identifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants