https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-08-17T05:28:13ZRedmineRedmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194412010-08-17T05:28:13ZJean-Baptiste Barth
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>7</i></li><li><strong>Assignee</strong> set to <i>Jean-Baptiste Barth</i></li></ul><p>I think it should work out of the box, no need for a specific macro or manual hack.</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194492010-08-17T07:37:06ZFelix Schäfer
<ul></ul><p>Nick, don't ask me why exactly that is (there are reasons for that, but somewhat deeper than the time I have now allows), but:</p>
<pre>> blah
foo</pre>
<p>Probably yields what you are looking for:</p>
<blockquote>
<p>blah</p>
</blockquote>
<p>foo</p>
<p>I don't know if this is redmine mangling textile's <code>bq.</code> tag or earlier redcloth/textile versions behaving that way, but the correct interpretation of:</p>
<pre>> blah
> foo</pre>
<p>Should be:</p>
<pre><code class="html syntaxhl"><span class="nt"><blockquote></span>
<span class="nt"><p></span>
"blah"<span class="nt"><br></span>
"> foo"
<span class="nt"></p></span>
<span class="nt"></blockquote></span></code></pre>
<p>rather than what we are getting now:</p>
<pre><code class="html syntaxhl"><span class="nt"><blockquote></span>
<span class="nt"><p></span>blah
foo<span class="nt"></p></span>
<span class="nt"></blockquote></span></code></pre>
<p>You can try that <a href="http://www.textism.com/tools/textile/index.php" class="external">on the textile example page</a>, though the tag for (block)quotes there is not <code>> </code> but <code>bq. </code>.</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194502010-08-17T07:43:57ZJean-Baptiste Barth
<ul></ul>So there are two problems behind what you say Felix (and what Redcloth implemented maybe) :
<ol>
<li>the wysiwyg buttons "quote" and "remove quote" add/remove <code>></code> signs at the beginning of each line</li>
<li>when you copy/paste mails, there's a <code>></code> at the beginning of each line, not just the blockquote. Plus I don't really see how we could have lines quoted multiples times (useful for mails, again) with this syntax</li>
</ol>
<p>What do you think ?</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194512010-08-17T08:04:07ZFelix Schäfer
<ul></ul><p>Well, the single tag that spans until the end of the current paragraph/the next <em>pair</em> of newlines is consistent with the rest of textile, e.g.:</p>
<pre>h2. some title
spanning 2 lines</pre>
<p>yields a title with a <code><br></code> in it spanning 2 lines:</p>
<a name="some-titlespanning-2-lines"></a>
<h2 >some title<br />spanning 2 lines<a href="#some-titlespanning-2-lines" class="wiki-anchor">¶</a></h2>
<p>or in html:</p>
<pre><code class="html syntaxhl"><span class="nt"><h2></span>
"some title"
<span class="nt"><br></span>
"spanning 2 lines"
<span class="nt"></h2></span></code></pre>
<p>In this respect, the current blockquote implementation breaks the textile idiom.</p>
<p>As to your questions: I'm not sure textile supports nested blockquotes, but that's probably only because of the use of <code>bq. </code> rather than a "specific" tag like <code>></code>. I think it should be possible to get nested blockquotes with <code>></code> repetition as it is done for lists (<code>**</code> starts a sublist in another <code>*</code>), as to mails: yes, there'd need to be some mangling to remove the extraneous <code>></code> on all lines past the first one, but that's the price to pay to have <em>textile</em> rather than <em>mail</em> syntax in the wiki fields :-)</p>
<p>(on a side-note: you can't start with a double-nested list item in textile, i.e. <code>** foo</code> on its own on a line will still generate a list of depth 1 instead of 2, but I suppose this is more a safe-guard for lists)</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194522010-08-17T08:05:42ZFelix Schäfer
<ul></ul><p>Come to think of it, <code>></code> already does everything we "need" except that it doesn't start a new blockquote when hitting a new <code>></code> and continues the current blockquote instead.</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194592010-08-17T12:38:21ZNick Peelman
<ul></ul><p>That's all well and good, for you and I and Jean here to discuss it in the context of a programming condundrum. But I have a dozen new Redmine users looking at it and going "Well that's dumb.", because it is (and i'm certain my users aren't the only ones). Headers make sense that they get a blank line after them. Paragraph tags too. The table syntax, while weird, is still better than MediaWiki's. But the quoting stuff is confusing for reasons passing understanding. I can't tell them to just wrap stuff in <code>pre</code> tags, because then long lines run off the screen and don't wrap, which is confusing as well for somebody not familiar with the problem.</p>
<p>Whether its right or not, in the context of the syntax, its not what people expect. I don't expect being able to paste in random text and have all the formatting preserved, but i DO expect at least the new lines to get preserved, without me having to go massage a giant body of text. <code>\n\r</code> is a <code>\n\r</code>, and that is especially true when <strong>quoting</strong>.</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=194602010-08-17T12:41:16ZNick Peelman
<ul></ul><p>Oh, and as Jean pointed out, the Quote/Unquote buttons in Redmine add a > to the beginning of each line, whether or not they should or not, based on your summation of how things work, further confusing users and the situation.</p> Redmine - Defect #6148: Quoting, newlines, and nightmares...https://www.redmine.org/issues/6148?journal_id=264032011-03-14T21:20:35ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>7</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>1.2.0</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed in <a class="changeset" title="Fixed: line breaks are ignored in quoted text (#6148)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/5133">r5133</a>. Line breaks are now preserved in quoted text.</p>
<blockquote>
<p>the current blockquote implementation breaks the textile idiom</p>
</blockquote>
<p>Maybe, but that's not the issue reported here. A nice thing is that it supports block formatting inside quoting:</p>
<blockquote>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
<ul>
<li>Donec odio lorem,</li>
<li>sagittis ac,</li>
<li>malesuada in,</li>
<li>adipiscing eu, dolor.</li>
</ul>
<blockquote>
<p>Nulla varius pulvinar diam. Proin id arcu id lorem scelerisque condimentum. Proin vehicula turpis vitae lacus.<br />Proin a tellus. Nam vel neque.</p>
<table>
<tr>
<td>test</td>
<td>test</td>
</tr>
<tr>
<td>cell</td>
<td>cell</td>
</tr>
</table>
</blockquote></blockquote>
<p>I doubt that it can be done with pure textile syntax. Please, let me know if I'm wrong.</p>