Skip to content

Commit dc872b7

Browse files
authored
Merge pull request #13 from JunHaoShih/fix-code-block-overflow
Fix code block overflow
2 parents 08f5af2 + d25b31f commit dc872b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/css/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
background: #0d1117;
3232
padding: 10px;
3333
border-radius: 10px;
34+
overflow-y: auto;
3435
}
3536

3637
.hljs-doctag,

src/pages/workspace/MarkdownPage.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ const mdEdit = computed({
116116
const saving = ref(false);
117117
118118
async function markdownInit(itemId: string) {
119-
// const itemId = getItemId(path);
120119
if (!markdownsStore.targetRepo(itemId)) {
121120
const md = await getMarkdown(itemId);
122121
if (!md) {
@@ -152,8 +151,8 @@ async function onDiscardClicked() {
152151
});
153152
}
154153
155-
watch(() => props.id, async (newValue) => {
156-
if (newValue) {
154+
watch(() => props.id, async (newValue, oldValue) => {
155+
if (newValue !== oldValue) {
157156
await markdownInit(newValue);
158157
}
159158
});

0 commit comments

Comments
 (0)