-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Handle insertions and deletions (<ins> and <del>) consistently across readers/writers #1560
Comments
This is probably desirable but technically difficult to get right because On Sun, Aug 24, 2014 at 2:17 PM, Martin Fenner [email protected]
|
We have the Spans in the AST. I think it would just be a matter of changing +++ mpickering [Aug 24 14 06:39 ]:
|
I get a bit worried about the sustainability of this approach in general especially as it causes unexpected results in a user has "insertion" class but also because you lose type guarantees and it makes code more difficult to understand in someone is unfamiliar. |
It does add some complexity. @mfenner, why not just add some +++ mpickering [Aug 24 14 08:40 ]:
|
One way to do this without an AST change would be to special-case these spans in the HTML writer. |
I think a dedicated element would work better in the long run.. considering for example how the image/figure hack turned out, I think it's better to include more AST elements. |
I've broadened the scope of this issue. If we decide to handle insertions/deletions better across pandoc, there are a few formats to consider. In HTML and markdown, pandoc 2.4 currently does:
Looking at CriticMarkup, from this closed issue:
See also the LaTeX changes package. And of course the existing docx If we go with an AST change, it might seem like we simply could:
However,
It seems the fundamental question is whether this should be modelled in the pandoc AST like the HTML So, input welcome on how different formats handle this. Especially, I'm unclear on how docx --track-changes and LaTeX handle:
|
As mentioned in that thread, the CriticMarkup spec actually recommends against these kinds of AST-breaking changes:
The one exception to this seems to be for insertion/deletion of paragraph breaks, I'm not sure if there's a clean way to handle that case. |
Don’t read too much into the current CriticMarkup “spec” though. It is not a proper parser but just a bunch of regex. (FYI I’m maintaining a fork of the reference implementation of CriticMarkup in the form of pancritic which provides Python 3 support among other things.) Multiline (ie Newlines crossing) shouldn’t be a big problem but “boundary crossing” between markdown markups and CriticMarkup is. If it is decided to support CriticMarkup (as a syntax, not its spec) in pandoc then we got to eventually decided on how it should behaves (ie a spec) which will most likely different from current one. |
Is it much work to spec out these issues? CriticMarkup is becoming a standard among Markdown editors, but it is difficult to pass it through standard |
I would argue for an AST based pandoc intrinsic implementation. Thanks to ickc the preporcessor variant has been around for some while, but it could gain wider audience if it was just a pandoc filter like the [1] https://gist.github.com/noamross/12e67a8d8d1fb71c4669cd1ceb9bbcf9 Also |
The new docx reader converts docx track changes into HTML. I suggest the following changes:
<ins>
and<del>
instead of<span class="insertion">
and `", as they are standard HTML tags and will render in most browsers.<span>
including author and date for combined insertions/deletions, rather use author and date attributes on both the<ins>
and<del>
tag.The text was updated successfully, but these errors were encountered: