Skip to content

Instantly share code, notes, and snippets.

View kofm's full-sized avatar
⛷️

Gabriele Mongiano kofm

⛷️
View GitHub Profile
@kofm
kofm / criticmarkup.lua
Created December 10, 2020 08:04 — forked from noamross/criticmarkup.lua
A pandoc filter for MS Word track changes to criticmarkup
-- 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
@kofm
kofm / wdiff.vim
Created December 4, 2020 21:05 — forked from sablime/wdiff.vim
" 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)