mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Upgrade downsize to 0.0.4
refs #1095 - added new unicode test to excerpt helper
This commit is contained in:
parent
ed9d216ae7
commit
1f853194ee
2 changed files with 15 additions and 1 deletions
|
@ -144,6 +144,20 @@ describe('Core Helpers', function () {
|
|||
rendered.string.should.equal(expected);
|
||||
});
|
||||
|
||||
it('can truncate html with non-ascii characters by word', function () {
|
||||
var html = "<p>Едквюэ опортэат <strong>праэчынт ючю но, квуй эю</strong></p>",
|
||||
expected = "Едквюэ опортэат",
|
||||
rendered = (
|
||||
helpers.excerpt.call(
|
||||
{html: html},
|
||||
{"hash": {"words": "2"}}
|
||||
)
|
||||
);
|
||||
|
||||
should.exist(rendered);
|
||||
rendered.string.should.equal(expected);
|
||||
});
|
||||
|
||||
it('can truncate html by character', function () {
|
||||
var html = "<p>Hello <strong>World! It's me!</strong></p>",
|
||||
expected = "Hello Wo",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"bookshelf": "0.6.1",
|
||||
"colors": "0.6.2",
|
||||
"connect-slashes": "0.0.11",
|
||||
"downsize": "0.0.3",
|
||||
"downsize": "0.0.4",
|
||||
"express": "3.4.4",
|
||||
"express-hbs": "0.5.1",
|
||||
"fs-extra": "0.8.1",
|
||||
|
|
Loading…
Reference in a new issue