Support heading text formats

msabnis - August 3, 2009 - 14:41
Project:Edit section
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have edit section working perfectly, thanks a ton for this module.
But when i added Markdown filter module, though the [edit] links show up, but clicking on it show the whole node and not the sections. I tries rearranging the orders, but no joy.

Could you help please?

#1

msabnis - August 3, 2009 - 14:51

sorry, i should have been more clear here. With Markdown module on, if I use <.h2.> to create sections, it works fine. But if i use markdown syntax ## (for <.h2.>), although the edit link shows up, but clicking on it edits the whole node and not that section.

#2

msabnis - August 3, 2009 - 14:56

if i move Edit section above Markdown in the filter orders, the edit links dont even show up in the node view.

#3

jbrown - August 3, 2009 - 22:08
Title:breaks with Markdown» Support Markdown filter
Version:6.x-1.0» 6.x-1.x-dev
Category:bug report» feature request

It's not compatible with markdown.

Headings need to be delimited with standard html heading tags in the node body for it to work.

#4

msabnis - August 4, 2009 - 18:44

when i looked deeper into the code, I believe it would be very difficult to support Markdown(considering i am not a super coder).
But got around to this issue by adding "##" to the delimiter declaration at the top of your code in the regex. Obviously this is not a correct solution but it works for my situation.

Once again, thanks a lot for this brilliant module. love you.

#5

Grayside - October 2, 2009 - 15:24

Wiki formats are a double-edged sword. They provide additional syntax for headings, but when applied they also change the character counts from the raw text in the database. What msabnis in #4 did strikes me as the right direction, despite being a hack.

The regular expression that processes headings and identifies the heading ordinal needs to be extensible. At that point, Edit Sections could either have module/filter conditional integration with formats like Markdown, or it could implement a hook system so input format modules could support Edit Sections on their own.

Between this problem and #594288: Suppress CCK Fields, I am going to see if I can cobble together an alternate mechanism for section edits. Thank you for the module, it is good example code.

#6

jbrown - November 2, 2009 - 03:44
Title:Support Markdown filter» Support heading text formats

I don't intend to be doing much more work on this module myself.

If you write version 2, I'll give you cvs access.

I wonder if the D7 API is any better for this than D6?

 
 

Drupal is a registered trademark of Dries Buytaert.