Skip to content

Commit 560ece9

Browse files
author
djinni-hppro
committed
.
1 parent 00dbefa commit 560ece9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/index.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
text-overflow: ellipsis;
3131
word-break: break-word;
3232
overflow: hidden;
33+
white-space: pre-wrap;
3334
}
3435

3536
.line-clamp-5 {
@@ -39,6 +40,7 @@
3940
text-overflow: ellipsis;
4041
word-break: break-word;
4142
overflow: hidden;
43+
white-space: pre-wrap;
4244
}
4345

4446
.dark {
@@ -181,10 +183,9 @@
181183
padding-left: 4px;
182184
}
183185

184-
185-
186186
.EasyMDEContainer .CodeMirror {
187187
padding: 0px;
188+
color: dimgray;
188189
}
189190

190191
.EasyMDEContainer .editor-preview code {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ document.addEventListener('alpine:init', () => { Alpine.data('mainApp', () => ({
248248
return new Date(isoString).toLocaleString();
249249
},
250250
getNotePreview(content) {
251-
return content ? `${content.substring(0, 200)}...` : 'No content preview';
251+
return content ? `${content.trim().replace(/(\r?\n)+/g, '\n').substring(0, 300)}...` : '<!-- EMPTY -->';
252252
},
253253

254254
getCoverImage(note) {

0 commit comments

Comments
 (0)