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

Indenting seems off around code blocks #19

Closed
drewish opened this issue Aug 15, 2013 · 3 comments
Closed

Indenting seems off around code blocks #19

drewish opened this issue Aug 15, 2013 · 3 comments

Comments

@drewish
Copy link

drewish commented Aug 15, 2013

Input:

If you don't already have a <code>php.ini</code> file you'll need to create one by copying the default:
<code>
sh-3.2# if ( ! test -e /private/etc/php.ini ) ; then cp /private/etc/php.ini.default /private/etc/php.ini; fi
</code>

Restart Apache:

Output:

If you don't already have a  `php.ini`  file you'll need to create one by copying the default:  `sh-3.2# if ( ! test -e /private/etc/php.ini ) ; then cp /private/etc/php.ini.default /private/etc/php.ini; fi`  Restart Apache:  `sh-3.2# apachectl restart`

Expected either:

If you don't already have a `php.ini` file you'll need to create one by copying the default:  

    sh-3.2# if ( ! test -e /private/etc/php.ini ) ; then cp /private/etc/php.ini.default /private/etc/php.ini; fi

Restart Apache:

    sh-3.2# apachectl restart

or one using GitHub style comment blocks that I can't seem to figure out how to format using markdown.

@xijo
Copy link
Owner

xijo commented Aug 15, 2013

Hi drewish,

in your examples you're using the code tag as inline element. I'd recommend to use a pre tag around code blocks, see http://www.w3schools.com/tags/tag_pre.asp

You can enable github style code blocks as well by using:

ReverseMarkdown.parse_string(input, github_style_code_blocks: true)

@drewish
Copy link
Author

drewish commented Aug 17, 2013

Ah, you're right. The markup I'm passing in was from a system that would convert newlines into br and p tags. I'll probably need to do some more manipulation before passing it in.

@drewish drewish closed this as completed Aug 17, 2013
@xijo
Copy link
Owner

xijo commented Aug 17, 2013

Nevermind and good luck! :)

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

2 participants