Download & Extend

Modify table generation code to add row alternation CSS classes

Project:Markdown filter
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Attached is a patch that alters the table-generation code to add 'odd'/'even' CSS classes, so Markdown tables get alternating row styling (like other Drupal tables).

AttachmentSize
markdown.php_tablerowalternation.patch1.02 KB

Comments

#1

Works for me! Great patch!

PS Clear cache to see the result.

#2

Status:needs review» reviewed & tested by the community

#3

Status:reviewed & tested by the community» needs work

Please update this to match the standards outlined in http://drupal.org/coding-standards. In particular, I see issues with whitespace around string concatenations and the formatting of if/else blocks.

#4

Status:needs work» closed (won't fix)

I don't think patching a 3rd-party library is the way we want to go with this. I'd suggest either (a) emailing Michel Fortin (http://michelf.com/projects/php-markdown/) to see if he'd be interested in this modification for Markdown, after which I'd be happy to include his changes in another module release; or (b) moving in the direction sreynen outlines here: http://drupal.org/node/515048#comment-2906948.

#5

And here comes a patch for list item row alteration!

AttachmentSize
markdown.php_listitemrowalteration.patch 971 bytes