Skip to content

Commit

Permalink
Truncating chars instead of words
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Oliveira <[email protected]>
  • Loading branch information
chocoelho committed Dec 14, 2015
1 parent ed9a82e commit cdaaafa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<h4><a href="{{result.url}}">{{ result.title }}</a></h4>
{% if result.body %}
<p><a href="{{result.url}}">{{ result.body|striptags|truncatewords:"85" }}</a></p>
<p><a href="{{result.url}}">{{ result.body|striptags|truncatechars:"140" }}</a></p>
{% endif %}

<small class="colab-result-register">{% trans "Registred in" %}: <strong>{% trans "Article" %}</strong></small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h4><a href="{{result.url}}">{{ result.title }}</a></h4>

{% if result.description %}
<p>{{ result.description|striptags|truncatewords:"85" }}</p>
<p>{{ result.description|striptags|truncatechars:"140" }}</p>
{% endif %}

<small><strong>{% trans "Since" %}: {{ result.created_at|date:"d F Y" }}</strong></small>
Expand Down

0 comments on commit cdaaafa

Please sign in to comment.