Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Support for header classes #38

merged 2 commits into from

2 participants


I added support for header classes in the Extra with the syntax {.class}, in addition to the id attribute {#id}.

(This is my first attempt at submitting anything on GitHub...sorry if I'm doing it wrong!)


Your pull request is excellent. But I think if classes get supported, multiple classes should be allowed and they should be all inside the same {curly brackets} together with the id too. So I don't think I'll accept it in the current form.


Good call! I changed some things, and now I think it works fully. Now both id and class attributes for headers are done in the same set of curly braces. All of the following syntaxes work, for both header flavors, as far as I can tell:

  • {#id}
  • {.class1}
  • {#id .class1}
  • {#id .class1 .class2}
  • {#id.class1.class2} (no spaces)

The id attribute does have to come first, but otherwise it's tolerant of any number of spaces before/after. Thanks!

@michelf michelf merged commit 4930b81 into michelf:extra

This was merged yesterday, but I redid parts of the attribute parser so that you don't necessarily have to put the id attribute first.

Your patch was a great base for the more generalized extra attribute block now used for fenced code blocks too. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 0 deletions.
Something went wrong with that request. Please try again.