support php-markdown-extra abbreviations #197

sunaku opened this Issue Feb 7, 2013 · 11 comments


None yet
9 participants

sunaku commented Feb 7, 2013


Please add support for abbreviations like php-markdown-extra.

Thanks for your consideration.


robin850 commented Apr 2, 2013

Hum, it doesn't seem to be in the Markdown specs. I think PHP-Markdown-extra is just an overlay to basic markdown with stuff which aren't in the specs. What do you think @mattr- ?


mattr- commented Apr 2, 2013

I think we should consider adding support for this in the same way that Redcarpet supports other extensions.

Isn't the risk that the number of supported Markdown extensions grows over time? All part of Redcarpet means added ongoing maintenance cost. There's also the possibility that two extensions might conflict or do the same thing in different ways; how do you pick the preferred syntax for demarcating, say, abbreviations, if there are two conflicting such syntaxes?

(Not saying I wouldn't like more features in Markdown, of course, but the lack of a proper spec makes this problematic. 😦)


mattr- commented Apr 2, 2013

Yes, that is a risk. If there are conflicting syntaxes or conflicting extensions, then we'll need to make a decision about how to handle it. We could find another conflicting extension and decide not to support this particular syntax. We could also introduce a feature i'm going to call 'markdown styles' where one would be able to choose which flavors of markdown to use and only get the features from that flavor. There are many ways to provide support for this one particular feature, once we choose to actually start implementing it. 😄

remino commented Sep 27, 2013


Any updates on this? Would very much like to see Markdown Extras in Redcarpet.

For those looking to mark up abbreviations without resorting to HTML, this plugin might be a better fit: (chiefly because it allows you to define a dictionary of abbreviations, saving you having to list them at the bottom of each document.)

The PHP Markdown docs (linked to above) is down, so I’ll post the documentation on how it deals with abbreviations here:


Markdown Extra adds supports for abbreviations (HTML tag <abbr>). How it works is pretty simple: create an abbreviation definition like this:

*[HTML]: Hyper Text Markup Language
*[W3C]:  World Wide Web Consortium

Then, elsewhere in the document, write text such as:

The HTML specification
is maintained by the W3C.

…and any instance of those words in the text will become:

The <abbr title="Hyper Text Markup Language">HTML</abbr> specification
is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.

Abbreviations are case-sensitive, and will span on multiple words when defined as such. An abbreviation may also have an empty definition, in which case <abbr> tags will be added in the text but the title attribute will be omitted:

Operation Tigra Genesis is going well.

*[Tigra Genesis]:

Abbreviation definitions can be anywhere in the document. They are stripped from the final document.

@kogakure’s jekyll-plugin-abbr is nice but not quite the same.

Any update on this? I'd normally be happy to do it myself, but the C code is beyond me.

I made an extension for Redcarpet that renders abbreviations.


sunaku commented Jan 28, 2015

👍 Hooray! Thank you @brandonweiss 🙇

I'd also love to see this added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment