Skip to content

Commit 8391840

Browse files
committed
Merged in [9663] from rjsparks@nostrum.com:
Try a different way of wrapping ballot/comment fields and shepherd writeups. Related to ietf-tools#1673. - Legacy-Id: 9679 Note: SVN reference [9663] has been migrated to Git commit 3c03290
1 parent 9f63a1e commit 8391840

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

ietf/templates/doc/document_ballot_content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h4 class="anchor-target" id="{{ p.ad.plain_name|slugify }}">
9797
<div class="panel-heading">
9898
<h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})</h5>
9999
</div>
100-
<div class="panel-body"><pre class="ballot">{{ p.discuss|wrap_text:80|escape|urlize }}</pre></div>
100+
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|escape|urlize }}</pre></div>
101101
</div>
102102
{% endif %}
103103

@@ -106,7 +106,7 @@ <h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d"
106106
<div class="panel-heading">
107107
<h5 class="panel-title"><b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev}}{% endif %})</h5>
108108
</div>
109-
<div class="panel-body"><pre class="ballot">{{ p.comment|wrap_text:80|escape|urlize }}</pre></div>
109+
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|escape|urlize }}</pre></div>
110110
</div>
111111
{% endif %}
112112
{% endfor %}

ietf/templates/doc/shepherd_writeup.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% extends "base.html" %}
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
33
{% load origin %}
4+
{% load ietf_filters %}
45

56
{% block title %}
67
Shepherd writeup for {{ doc.canonical_name }}-{{ doc.rev }}
@@ -10,7 +11,7 @@
1011
{% origin %}
1112
<h1>Shepherd writeup<br><small>{{ doc.canonical_name }}-{{ doc.rev }}</small></h1>
1213

13-
<pre>{{writeup}}</pre>
14+
<pre class="pasted">{{writeup|escape|urlize}}</pre>
1415

1516
{% if can_edit %}
1617
<a class="btn btn-primary" href="{% url "doc_edit_shepherd_writeup" name=doc.name %}">Edit</a>

static/css/ietf.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ pre {
195195
white-space: pre;
196196
}
197197

198+
/* Some chunks of text are likely to be pasted into fields from other editing environments
199+
which do various things with line-wrapping. Preserve whitespace to the extent possible. */
200+
.pasted {
201+
white-space: pre-wrap;
202+
word-break: keep-all;
203+
}
204+
198205
/* Make ampersands pretty */
199206
/* This sets ampersand in a different font than the rest of the text. Fancy, but it's
200207
really better to select a pretty font in the first place. Additionally, _which_ 'pretty'

0 commit comments

Comments
 (0)