Split marksmarty filter into Markdown and Smartypants filter

milianw - February 14, 2008 - 19:14
Project:Markdown with SmartyPants
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:milianw
Status:closed
Description

I've started separating marksmarty into a markdown and a smartypants filter. Works nicely so far.

It's important that we split marksmarty (the filters, not the module). Take the usability aspect: Right now we give him the option to enable Marksmarty. Then he can choose wether or not to enable Markdown or Smartypants. With my changes he either enables or disables those features in the normal way. Cleaning up user interaction process is a good thing imo. Moreover we now get the option to arrange SmartyPants on its own. This is nice since then we can put it at the end of the filterlist, so no hickups with GeSHi or similar occur.

I'll add a patch but I don't get it how I could possibly add such features and improvements when my other patches don't get any responses. Shall I remove all things I've done just to make a new improvement? I recon I can't just remove those changed lines from the diff.

So before saying that I should clean up my patch, please give me feedback in the other issues and - hopefully - submitt at least some of those patches.

AttachmentSize
split_marksmarty.patch10.16 KB

#1

moshe weitzman - February 20, 2008 - 17:48
Status:needs review» needs work

I support splitting off smartypants into own module and getting rid of those enabed/disabled variables for each filter.

#2

milianw - February 20, 2008 - 22:04

I will do that. But when we split into different modules, the marksmarty project would have to be renamed. Is this easily possible? I don't want to lose the bug reports.

I think I'll first put the SmartyPants code into an extra module, then we can remove SmartyPants from this module and rename it properly.

#3

moshe weitzman - February 20, 2008 - 22:34

we can easily rename the project and keep our issues. the only somewhat hard part is renaming in CVS. we'll do that if the CVS admins think it is a good idea.

#4

milianw - February 22, 2008 - 12:38

OK, done it. In the new markdown module are some things left to do:

Markdown related:

  1. INSTALL.txt and README.txt need an overhaul. Especially remove all traces to SmartyPants which should be straight forward. But there are other parts in those files which seem to be unnecessary and old. Take the part about "filtering live" which is not the case anymore.
  2. I've added a patch and a tarball. The patch requires the old file names, but the patch includes already renamed files and folder. Also the project was renamed to Markdown. Could you request the renaming in CVS and of this project?
  3. I've deleted the settings function for Markdown since there are no settings left. The syntax help part got moved to markdown_help() but I dunno where to put the version info. Any ideas?

SmartyPants related:

  1. plain SmartyPants is supported just the way it was beforehand. But I really want to make it a Typographer module. Would that be ok?
  2. Who will be maintainer of this module. Me? If so, I need to apply for a CVS account.
AttachmentSize
split_markdown.patch 7.93 KB
markdown.tgz 26.02 KB
smartypants.tgz 8.47 KB

#5

moshe weitzman - February 22, 2008 - 13:10

I already see http://drupal.org/project/typogrify. Perhaps we can just get rid of smartypants and recommend that one? Or maybe typographer is better for some reason. In any case, I will proceed with slimming markdown module

#6

milianw - February 22, 2008 - 13:31

I'll get in touch with the typogrify maintainer. Thanks

#7

Garrett Albright - March 20, 2008 - 05:28

I have created a module which implements Markdown, Markdown Extra, SmartyPants, and SmartyPants Typographer all as separate filters, so you can very easily pick and choose which one you want to use. I was planning on packaging it all up neatly and offering it on this site, but it looks like the Drupal crew does not allow us to submit modules which replicate the features of another, pre-existing module, even if it does so in a wildly-different way. I still want to offer it to all those interested, however, so if you want to give it a try, please get in touch with me. Right now it's D6 only, though I can probably backport it to D5 in a matter of minutes if anyone needs it.

On a related note, anyone know of any Drupal module repository sites which allow modules that "break the rules" of the standard Drupal site?

#8

soxofaan - May 2, 2008 - 14:30

(subscribe)
Separating markdown and smartypants seems very sensible since they are not related IMHO
Also with the typogrify module, dropping smartypants from marksmarty seems the way to go.

#9

soxofaan - May 2, 2008 - 14:41

I will do that. But when we split into different modules, the marksmarty project would have to be renamed. Is this easily possible? I don't want to lose the bug reports.

What's wrong with creating a new Markdown project? There are not a lot of bug reports in the tracker right now and it is possible to move bug reports to a different project.
It is maybe also better to let marksmarty exist how it is now for legacy reasons.

You can put something on the marksmarty project page like "MarkSmarty is deprecated now, it is recommended to use Markdown and Typogrify instead."

Splitting modules to different project are not rare in Drupal.

#10

Gábor Hojtsy - June 2, 2008 - 11:27

Yay for splitting the module! Configuring markdown and smartypants (or typogrify) would be great to be possible with usual filter configs, not the current custom ways.

#11

Gábor Hojtsy - June 2, 2008 - 13:31
Status:needs work» fixed

Discussed with Moshe on IRC and submitted http://drupal.org/project/markdown with just the Markdown (Extra) filter. This breaks this module down to http://drupal.org/project/markdown and http://drupal.org/project/typogrify

Garrett, please continue in that module's queue with possible settings / separate filters for Markdown and Markdown Extra. If you are interested, at least start a discussion there.

#12

Anonymous (not verified) - June 16, 2008 - 14:35
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.