This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- a lua filter for panodoc | |
-- run pandoc your_word_doc.docx --track-change=all -t markdown --lua-filter=criticmarkup.lua | |
-- TODO: Detect substitutions in adjacent insertion/deletions | |
-- TODO: capture whole comment hightlight rather than just start point of comment | |
function Span(elem) | |
if elem.classes[1] and elem.classes[1] == "insertion" then | |
local opener = { pandoc.RawInline(FORMAT, "{++ ") } | |
local closer = { pandoc.RawInline(FORMAT, " ++}") } | |
return opener .. elem.content .. closer | |
elseif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Usage: | |
" Copy this file to your ~/.vim/autoload directory. | |
" :edit oldfile | |
" :new newfile | |
" :call wdiff#highlight(2, 1) " wdiff#highlight(winnr1, winnr2) | |
let s:save_cpo = &cpo | |
set cpo&vim | |
function wdiff#highlight(Awinnr, Bwinnr) |