By Lexas on
Hello guys!
I'm needing a simple plain text to html filter (autop, html validation, these kind of stuff) to a small project and Drupal's ones are perfect to it. I've seen its filter module and I'm reading it, but I can't find exactally what's the function that receives text as parameter and returns it filtered.
I used the _filter_autop() function, but if I add a bunch of empty lines they are converted to a unique empty line after filtering... I wanted the amount of lines to remain the same.
Could somebody give me a hint on where to look?
Comments
_
First, have you checked out the existing filters? There are several that take plain text formats and convert to html-- http://drupal.org/project/textile and http://drupal.org/project/markdown spring to mind. Second, there's also the http://drupal.org/project/flexifilter module. if nothing else, you can look at the code of those modules for ideas.
What I'm having problem is
What I'm having problem is replacing multiple empty lines in original text to multiple paragraphs in output.
They are merged into a unique line, and spacing is lost. Any idea on how to convert \n's and stuff like that into HTML paragraphs?