Skip to content

Commit

Permalink
fix(plugin-md-power): hydration errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Sep 3, 2024
1 parent 0c7e900 commit c5216e1
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions plugins/plugin-md-power/src/client/components/CodeRepl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,16 @@ function runCode() {
</p>
<div v-if="stderr.length" class="stderr">
<h4>Stderr:</h4>
<p
<pre
v-for="(item, index) in stderr" :key="index"
:class="{ error: lang === 'rust' && item.startsWith('error') }"
>
<pre>{{ item }}</pre>
</p>
>{{ item }}</pre>
</div>
<div v-if="stdout.length" class="stdout">
<h4 v-if="stderr.length">
Stdout:
</h4>
<p v-for="(item, index) in stdout" :key="index">
<pre>{{ item }}</pre>
</p>
<pre v-for="(item, index) in stdout" :key="index">{{ item }}</pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -214,27 +210,27 @@ function runCode() {
font-size: 16px;
}
.output-content p {
.output-content pre {
margin: 0;
font-size: 14px;
line-height: 20px;
}
.output-content p pre {
.output-content pre {
width: fit-content;
padding: 0 20px 0 0;
margin: 0;
overflow-x: initial;
}
.output-content .error,
.output-content .stderr p,
.output-content.rust .stderr p.error {
.output-content .stderr pre,
.output-content.rust .stderr pre.error {
color: var(--vp-c-danger-1, #b8272c);
transition: color var(--t-color);
}
.output-content.rust .stderr p {
.output-content.rust .stderr pre {
color: var(--vp-c-text-1);
}
Expand Down

0 comments on commit c5216e1

Please sign in to comment.