Markdown in Elixir
Refactor a Markdown parser
exercism fetch elixir markdown
Refactor a Markdown parser.
The markdown exercise is a refactoring exercise. There is code that parses a given string with Markdown syntax and returns the associated HTML for that string. Even though this code is confusingly written and hard to follow, somehow it works and all the tests are passing! Your challenge is to re-write this code to make it easier to read and maintain while still making sure that all the tests keep passing.
It would be helpful if you made notes of what you did in your refactoring in comments so reviewers can see that, but it isn't strictly necessary. The most important thing is to make the code better!
Execute the tests with:
$ elixir markdown_test.exs
In the test suites, all but the first test have been skipped.
Once you get a test passing, you can unskip the next one by
commenting out the relevant
@tag :pending with a
Or, you can enable all the tests by commenting out the
ExUnit.configure line in the test suite.
# ExUnit.configure exclude: :pending, trace: true
For more detailed information about the Elixir track, please see the help page.
Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.