RFC: Remove Paragraph Tags between Tags

Aristotle Pagaltzis pagaltzis at gmx.de
Sun Nov 24 10:59:42 EST 2013


* Mariusz Wojcik <mdickie007 at gmail.com> [2013-11-24 09:10]:

> > What problem are you actually trying to solve?

>

> That Problem I want to solve is to have a Menu for my simple CMS. This

> Menu which is created with Markdown needs a specified class. I don't

> want to use all over there html tags.

>

>

> > Yours is a bad solution, but implies that what I provided before

> > didn't meet your needs.

> >

> > Is there a reason it didn't?

>

> Yes, I want to set the class of the `<ul>` element which doesn't work

> in Markdown style AFAIK.


Uhm.

You wrote all the <li>s and everything inside them in HTML already. If
you just wrote the <ul> tags around those, then Markdown would leave
your content alone. And you say you need to do it this way because you
need to put a special class on your <ul>s. But the problem is caused by
the fact that… you didn’t write your <ul>s there at all.

This is incoherent. The only way I can make sense of it is if you’re
failing to say that the <ul> tags are to be supplied by your CMS, and
you must provide only the content between them.

Is that the case?

If so, then you’re out of luck with Markdown. If you use it, there is no
way to get just a bare block of <li> tags with nothing around them. It’s
not a use that it was designed for.

If you are writing the CMS yourself then I’d suggest using Markdown and
doing something like .replace('^<ul>', '<ul class="whatever">') on the
output.

If not, then try to find if you can turn of Markdown processing for the
navbar and just put in the raw HTML you had already written.

--
Aristotle Pagaltzis // <http://plasmasturm.org/>


More information about the Markdown-Discuss mailing list