This Space for Rent

New Code!

Discount has been pushed up to version 1.2.8 with the addition of a couple of features suggested by members of the Ruby community for the rdiscount Ruby addon:

  1. Rick Olson submitted a patch to disable emphasis in the middle of words, because he wanted to be able to discuss code with embedded_underscores without having markdown go berserk on him. I can’t blindly disable midword emphasis without breaking standards compliance, but I did add the new configure option --relaxed-emphasis which does break the emphasis rules for _ (and, as of right now, only _), which makes things like a_b (or, if you’re describing code, thing like size_t or time_t or …) not work correctly anymore. This which may not be a problem for you if you’re writing about code and you don’t want to spend a lot of time putting ‘`’s into your code.
  2. John Muhl, who has developed a markdown extension for the CMS package Radiant, has found a couple of things that discount doesn’t parse properly. One of them (insanely nested <div>s) I’m not going to touch, but the other one is a cosmetic bug where the atx-style header # FOO generates <h1> FOO</h1>, which may not be wrong, but it’s ugly and I’ve fixed it.
  3. Ryan Tomayko, who wrote the Ruby package rdiscount in the first place, announced it on his weblog, and one of the resulting comments expressed the desire for a way to sanitize embedded html. Well, I can do that – I added the new flag MKD_NOHTML, which blocks all embedded html and forces the user to use the markup language for doing markup, like G-d himself intended.

There are, oddly enough, no bug fixes here, just new features. This, no doubt, means that something is about to explode, and isn’t that a good enough reason to rush out and install some nice New Code! right now?

Comments


Great stuff! I’ll push out an update to rdiscount shortly.

Ryan Tomayko Tue Aug 12 08:38:44 2008

So, I’ve had a couple of beers tonight and it’s quite likely that I’m doing something wrong here but the discount-1.2.8 tarball looks exactly like the discount-1.2.7 tarball:

$ curl http://www.pell.portland.or.us/~orc/Code/discount/discount-1.2.7.tar.gz | tar xvzf -
$ curl http://www.pell.portland.or.us/~orc/Code/discount/discount-1.2.8.tar.gz | tar xvzf -
$ diff -ruN discount-1.2.{7,8}
diff -ruN discount-1.2.7/VERSION discount-1.2.8/VERSION
--- discount-1.2.7/VERSION      2008-07-30 22:31:45.000000000 -0700
+++ discount-1.2.8/VERSION      2008-08-11 21:19:41.000000000 -0700
@@ -1 +1 @@
-1.2.7
+1.2.8

Odd, no?

Ryan Tomayko Thu Aug 21 22:41:25 2008

Son of a gun, git lied to me; the master repository had fallen out of date with the copy on the development machine, and the only thing that it updated was the lovely version file.

Goddamn.

I brute-forced 1.2.8 up to the code level that was on the development machine and republished the source from that; the source trees appear to have the correct changes, so see what it looks like now.

David Parsons Fri Aug 22 08:00:19 2008

Comments are closed