Replies: 1 comment 1 reply
-
It's difficult. As you mentioned, our plugins currently don't support this and I don't think they will in the near future. This kind of feature is just plain difficult to implement on top of how Prism plugins currently work. Even implementing it as two code blocks is difficult. The "holes" additions and deletion leave on either side are difficult to deal with, especially when considering word warping. We would probably also have to change how the Line Numbers plugin fundamentally works to support holes.
Of course, it's possible, just difficult. Our current plugin won't help you much (they just weren't intended for this), so Prism will likely only be useful for the syntax highlighting. The whole diffing logic (converting a unified diff into a split diff) would have to be handled by something else. Frankly, this is less the job of a plugin and more of a library/component that uses Prism to do the syntax highlighting. |
Beta Was this translation helpful? Give feedback.
-
I understand that there's already a diff highlight plugins.
I'm asking how possible is it to use prismjs to show the diff as side by side comparison as per above? I am not asking as a new feature request. I'm asking whether if it's theoretically impossible in the first place to build a different plugin that builds on top of prismjs to do this
Beta Was this translation helpful? Give feedback.
All reactions