Using panflute could convert from token to the pandoc ast, which may be useful for further processing to the other outputs formats which pandoc offers