# Help with the markdown previewer

**URL:** <https://forum.freecodecamp.org/t/help-with-the-markdown-previewer/303101>\
**Category:** General\
**Created:** [August 6, 2019, 4:07pm UTC](https://forum.freecodecamp.org/t/help-with-the-markdown-previewer/303101 "2019-08-06T16:07:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TaraBryn](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tarabryn/32/117728_2.png) [@TaraBryn](https://forum.freecodecamp.org/u/TaraBryn)\
**Post date:** [August 6, 2019, 4:07pm UTC](https://forum.freecodecamp.org/t/help-with-the-markdown-previewer/303101/1 "2019-08-06T16:07:35Z")

</div>

I posted this early, but I wasn’t able to get a response that helped with the problem, and I think part of my issue was that I posted it in the wrong subforum, so I’m trying again. My [markdown previewer](https://codepen.io/TaraBryn/pen/QeMGjy) is working for the most part except one issue. This is my input reducer for Redux:

```auto
  function inputRedux(state = INITIAL_STATE, action){
    switch(action.type){
      case UPDATE:
        return {
          input: action.input,
          marked: marked(action.input,{
            breaks: true
          })
        };
      default: return state;
    };
  }

```

currently, it fails on test #6: “When my markdown previewer first loads, the default markdown in the #editor field should be rendered as HTML in the #preview element”

If I remove the `breaks: true` option, then test 6 passes, but test 7 fails: " OPTIONAL BONUS (you do not need to make this test pass): My markdown previewer interprets carriage returns and renders them as   
 (line break) elements (HINT: read the Marked.js docs for this one!)."

According to [https://www.diffchecker.com/](https://www.diffchecker.com/) the generated html in both cases is identical.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 9:33am UTC](https://forum.freecodecamp.org/t/help-with-the-markdown-previewer/303101/2 "2021-01-17T09:33:08Z")

</div>

Closed on January 17, 2021, 9:33am UTC


