mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
Merge pull request #1608 from halfdan/1095-unicode-words
Upgrade downsize to 0.0.4
This commit is contained in:
commit
f84f0d18f1
2 changed files with 15 additions and 1 deletions
|
@ -144,6 +144,20 @@ describe('Core Helpers', function () {
|
||||||
rendered.string.should.equal(expected);
|
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 () {
|
it('can truncate html by character', function () {
|
||||||
var html = "<p>Hello <strong>World! It's me!</strong></p>",
|
var html = "<p>Hello <strong>World! It's me!</strong></p>",
|
||||||
expected = "Hello Wo",
|
expected = "Hello Wo",
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"bookshelf": "0.6.1",
|
"bookshelf": "0.6.1",
|
||||||
"colors": "0.6.2",
|
"colors": "0.6.2",
|
||||||
"connect-slashes": "0.0.11",
|
"connect-slashes": "0.0.11",
|
||||||
"downsize": "0.0.3",
|
"downsize": "0.0.4",
|
||||||
"express": "3.4.4",
|
"express": "3.4.4",
|
||||||
"express-hbs": "0.5.1",
|
"express-hbs": "0.5.1",
|
||||||
"fs-extra": "0.8.1",
|
"fs-extra": "0.8.1",
|
||||||
|
|
Loading…
Add table
Reference in a new issue