separate attribute and code block parsers

Should let us deal with #3 easier. Affects #2 because of refactor.
r markdown parser example

might help with #2