Skip to content

Commit

Permalink
Fixing formatting, unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Rosenberg committed Jan 25, 2013
1 parent 1f6621f commit 518e49b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ext/redcarpet/html.c
Expand Up @@ -124,10 +124,11 @@ rndr_blockcode(struct buf *ob, const struct buf *text, const struct buf *lang, v

if (lang && lang->size) {
size_t i, cls;
BUFPUTSL(ob, "<pre><code class=\"");
if (options->flags & HTML_PRETTIFY) {
BUFPUTSL(ob, "prettyprint");
BUFPUTSL(ob, "<pre><code class=\"prettyprint");
cls++;
} else {
BUFPUTSL(ob, "<pre><code class=\"");
}

for (i = 0, cls = 0; i < lang->size; ++i, ++cls) {
Expand Down
2 changes: 1 addition & 1 deletion test/redcarpet_test.rb
Expand Up @@ -329,7 +329,7 @@ def test_that_fenced_flag_works_without_space
def test_that_prettify_works
text = "foo\nbar\n```\nsome\ncode\n```\nbaz"
out = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(:prettify => true), :fenced_code_blocks => true).render(text)
assert !out.include?("<pre><code class=\"prettyprints\">")
assert !out.include?("<pre><code class=\"prettyprint\">")
end

def test_that_headers_are_linkable
Expand Down

0 comments on commit 518e49b

Please sign in to comment.