I may not have understood well, but the indented block belongs to the else clause. Double-checking... Yeah, it looks ok: if we have a cached version (`global __version`) return it, else go get it from pandoc's output, cache it and return it. I think that's it. That's what is intended at least.