Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fenced Code Block not keeping spacing/formatting #885

Closed
YeomansIII opened this issue Apr 18, 2017 · 1 comment
Closed

Fenced Code Block not keeping spacing/formatting #885

YeomansIII opened this issue Apr 18, 2017 · 1 comment

Comments

@YeomansIII
Copy link

YeomansIII commented Apr 18, 2017

The purpose of the fenced code block in markdown is to designate language formatting and keep exact spacing and formatting. However, I am using the Angular2-Markdown package which uses Marked.

When the markdown is compiled, the spacing within my code blocks is removed. This spacing is used to indent the lines and without it the code block is virtually useless.

Below is the code block using the Github markdown in this comment text:

function fancyAlert(arg) {
    if(arg) {
        $.facebox({div:'#foo'})
    }
}

Below is an image of what the code block looks like after being compiled with Angular2-Markdown and Marked:
screen shot 2017-04-18 at 19 50 26

As you can see, the Github formatted markdown keeps the spacing, while the Marked formatted markdown does not contain the spaces.

Am I missing a setting, or is this a bug as I have suspected?

I have also posted this issue on the angular2-markdown repo: dimpu/ngx-md#47

Thanks.

@YeomansIII
Copy link
Author

I believe this may be an issue with the method in which we are storing the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant