Skip to content

Commit 624c92a

Browse files
committed
Merge pull request #122 from 10gen/INT-596-doc-viewer-large-strings
INT-596 cap strings at 100 char in document viewer
2 parents 7a40b3f + 6cf6518 commit 624c92a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/document-list/document-list-item.jade

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ mixin jsvalue(value, _type)
88
else
99
if _type === 'Date'
1010
- value = moment(value).format('LLL')
11+
if _type === 'String'
12+
- // cap at 500 char for strings
13+
- value = value.length > 500 ? value.substring(0, 500) + '...' : value
1114
.document-property-value(title=value)= value
1215

1316
mixin jsarray(items)

0 commit comments

Comments
 (0)