Small code changes

Refactoring of the code in function parse-markdown, if and let were
exchanged for if-let expression