Spanning tables Markdown extension

Sorry for the long pause in coming goodies. I do lots of exciting stuff but unfortunately confidential for the moment. It will see the daylight soon though, I hope 🙂

In my free time – I’m developing a set of extensions to help formatting some of my markdown documents that I need to publish. From a couple of useful features I’m planning to add, I’ve chosen to start with the spanning (i.e. supporting rowspan/colspan) tables. Here’s a tiny 100-line module that works with Python-Markdown. It will take this:

| col1 | col2 | col3  |
|------|------|-------|
| lorem       | ipsum |
|-------------| dolor |
| sit  | amet |-------|
| sit  |------| amet  |
|------| elit |-------|
| amet |      | lorem |
|------|------|-------|
| *piscin*            |
|------|--------------|
| one  | more         |

and produce this:

.

Usage:

python -m markdown test.md -x tables >test.html

Download: spanning_tables_markdown.zip

Enjoy!

PS. If for whatever reason it doesn’t do the trick for you, you can also try: Markdown-GridTables but I wrote this in fact because the latter didn’t work with some spanning scenarios I had in my docs.

PS2. I’ve established a GitHub repo for further development: https://github.com/sadaszewski/scimd

1 Comment

  • Hi there, for Web optimization real contents are genuinely needed, if you just make a copy and paste then you can not rated in search engines.
    Legendario.


Leave a Reply

Your email address will not be published. Required fields are marked *