markdown/codeblocks: implements functions re codeblocks

would be used in implementing issue #42.