Defect #5533

Ellipses at the end of snippets shouldn't be textilized

Added by Felix Schäfer over 1 year ago. Updated over 1 year ago.

Status:Closed Start date:2010-05-16
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:UI
Target version:-
Affected version:devel Resolution:Cant reproduce

Description

I just noticed that document snippets textilization on the document overview page (introduced in r3602) also textilizes the ellipse (…) at the end of the snippet. The ellipse should get added to the snippet only after it has been textilized, not the other way round.

test_index_with_long_description.diff (2 kB) Gregor Schmidt, 2010-06-19 23:48

Associated revisions

Revision 3788
Added by Eric Davis over 1 year ago

Added tests for #5533's behavior.

Contributed by Gregor Schmidt.

History

Updated by Jean-Philippe Lang over 1 year ago

What is the problem with that?

Updated by Felix Schäfer over 1 year ago

Any "unclosed" styling will apply to the ellipses, but they should'nt be styled to make clear that they are not part of the content.

"Just an example" might end as "Just and exam…" right now, or worse could get in the middle of a link and whatnot.

Updated by sdf dfg over 1 year ago

  • Assignee set to Christian Bradley

哈哈,hello

Updated by Felix Schäfer over 1 year ago

  • Assignee deleted (Christian Bradley)

Reverting spam.

Updated by Gregor Schmidt over 1 year ago

The changes in application_helper to truncate the description will only remove full lines. That way only multi-line formattings will be broken. Links and simple text formatting with * and the like will remain intact.

The only multi-line formatting rule I could come up with is pre.

When first applying the textile transformation and truncating afterwards, the three dots will be rendered on a separate line below the pre formatted text. This would not look any better.

If I did not miss an edge case, I would suggest to close this ticket as won't fix.

Attaching a test case, that tests the current behavior.

Updated by Eric Davis over 1 year ago

  • Status changed from New to Closed
  • Target version deleted (0.9.5)
  • Resolution set to Cant reproduce

I agree with Gregor Schmidt, his test case shows that full lines are truncated and then textilized preserving the formatting (visual example: http://rubular.com/r/Xm8AEzMooZ).

If you can provide the exact content that causes an issue, please post it here and we can look into it again.

Also available in: Atom PDF