Skip to content

Make fenced code blocks add the class to code rather than pre#71

Merged
jgm merged 1 commit intocommonmark:masterfrom
mathiasbynens:patch-1
Sep 7, 2014
Merged

Make fenced code blocks add the class to code rather than pre#71
jgm merged 1 commit intocommonmark:masterfrom
mathiasbynens:patch-1

Conversation

@mathiasbynens
Copy link
Copy Markdown
Contributor

This matches the convention set out in the HTML Living Standard (http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-code-element) and makes existing syntax highlighting scripts recognize the programming language used.

Ref. http://talk.standardmarkdown.com/t/fenced-code-blocks-should-add-class-to-code-rather-than-pre-matching-the-html-best-practice/136

@lipis
Copy link
Copy Markdown

lipis commented Sep 5, 2014

+1

@mathiasbynens mathiasbynens changed the title Make fenced code blocks add the classto code rather than pre Make fenced code blocks add the class to code rather than pre Sep 5, 2014
@coding-horror
Copy link
Copy Markdown
Contributor

I do think this is a good idea.

jgm added a commit that referenced this pull request Sep 7, 2014
Make fenced code blocks add the `class` to `code` rather than `pre`
@jgm jgm merged commit 9858400 into commonmark:master Sep 7, 2014
jgm added a commit that referenced this pull request Sep 7, 2014
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

Successfully merging this pull request may close these issues.

4 participants