Hi, first of all thanks for such a great syntax, so far it's the best I know! I have a document with quite long titles and I was wondering if it was possible to hard-break them: e.g.: This is a veeeeeeeeeeeeeeeeeeerrrrrrrrrrrrry long title ====================================================== would be This is a veeeeeeeeeeeeeeeeeeerrrrrrrrrrrrry ===========================================long title ========= Right now it produces two <h1/> tags. Best, Alexandre
On Mon, Mar 1, 2010 at 4:22 PM, Alexandre Leray <alexandre at alexandreleray.com> wrote:> Hi, > > first of all thanks for such a great syntax, so far it's the best I know! > > I have a document with quite long titles and I was wondering if it was > possible to hard-break them: >You know, at first I was going to say that multi-line headers are explicitly forbidden. Then I checked the syntax document and it says nothing of the sort, However, as far as I know, every implementation works that way - probably because markdown.pl works that way. However, if they were supported, there would be a few ambiguities: Which of these are a multi-line header: Line one of header Line two of header ============ Line one of header ============ Line two of header ============ Currently, it is known by many authors that Markdown allows headers to not have blank lines before and/or after them. So, there could be documents in which the author intended the first line in the first example to be a paragraph - as it would be parsed now. And the author could have intended the second example to actually be two separate headers. Even hash header could have this problem: # Line one of header Is this line 2 or a new paragraph? In the thousands of existing documents out there, that second line is expected to be a new paragraph, not part of the header. And that's the problem, lazy authors have been relying on the existing behavior for so long that changing it now could break thousands of existing documents. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg
Hi Alexandre, * Alexandre Leray <alexandre at alexandreleray.com> [2010-03-01 22:35]:> I have a document with quite long titles and I was wondering if > it was possible to hard-break them: > > e.g.: > > This is a veeeeeeeeeeeeeeeeeeerrrrrrrrrrrrry long title > ======================================================> > would be > > This is a veeeeeeeeeeeeeeeeeeerrrrrrrrrrrrry > ===========================================> long title > =========> > Right now it produces two <h1/> tags.you could always fall back on HTML: <h1>This is a veeeeeeeeeeeeeeeeeeerrrrrrrrrrrrry long title</h1> If you need inline formatting inside the header, then hopefully your implementation supports the `markdown` pseudo-attribute: <h1 markdown=1>This is a very, very, very, *very* long title</h1> * Waylan Limberg <waylan at gmail.com> [2010-03-02 00:05]:> And that's the problem, lazy authors have been relying on the > existing behavior for so long that changing it now could break > thousands of existing documents.This sort of laziness seems like a design goal of Markdown, not a bug in its users. * Tim Visher <tim.visher at gmail.com> [2010-03-02 02:30]:> If you're desperate for a multi-line header in markdown, you > have a few options. > > 1. Use Non-semantic markup directly in the document: > > <h1>This is line one of a<br /> > very long header!</h1> > > That's not recommended simply on the grounds of it not being > semantic and no one likes non-semantic markup. ;)Non-semantic, says who? More importantly, the problem was not to display a header across two lines in the rendered document, it was being able to write the header across several lines in the source document (and still have a single tag in the rendered document), so your solutions aren?t. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>
Thanks for all your replies, I have indeed no problem to render my titles as headers, the idea was more about having a pure markdown well designed source document. I like mine to be hard-wrapped, 78 characters a line, so I guess there is no actual solution. Is there often this kind of backward compatibility problems? In that case what about maintaining a backward compatible markdown and a non backward compatible one? Best, Alex On 03/02/2010 07:32 AM, Aristotle Pagaltzis wrote:> Non-semantic, says who? > More importantly, the problem was not to display a header across > two lines in the rendered document, it was being able to write > the header across several lines in the source document (and still > have a single tag in the rendered document), so your solutions > aren?t. > > > Regards, >