Archives for Tuesday, August 7th, 2007
You are currently browsing 1 article(s) published on Tuesday, August 7th, 2007, please try the search if you can't fint what you're looking for.
Markdown Heading Level PHP Function
Tuesday, August 07, 2007
If you use Markdown-syntax for articles/comments or whatever like I do you know that the #-symbol defines a heading.
But depending on where an article is displayed on a page you may want to adjust the heading-levels.
On exscale.se for example the maximum allowed heading-level for an article on the index-page is 4 (<h4>). This is because the title of the article on the index-page is a <h3>.
I've created a little php-function that adjusts markdown heading-levels to whatever the user wants, so that the same article can be displayed on different pages where heading-levels aren't the same.
- Continued...
- Comments are off
- Filed under PHP, Semantics





