Skip to content

Commit 29488d6

Browse files
committed
fix(federatedfilesharing): pre must not be a child of p
Fix the problem reported: > [plugin vite:vue] apps/federatedfilesharing/src/components/PersonalSettings.vue: <pre> cannot be child of <p>, according to HTML specifications. > This can cause hydration errors or potentially disrupt future functionality. `p` only allows inline elements, but pre is none. We either need to use `div` instead of `p` or `code` instead of `pre`. But in this case we want a block of code, so we use `div` and inner `<pre><code>`. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 7165131 commit 29488d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/federatedfilesharing/src/components/PersonalSettings.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ async function copyCloudId(): Promise<void> {
134134
</a>
135135
</p>
136136

137-
<p>
138-
{{ t('federatedfilesharing', 'HTML Code:') }}
137+
<div>
138+
<p>{{ t('federatedfilesharing', 'HTML Code:') }}</p>
139139
<br>
140-
<pre>{{ htmlCode }}</pre>
141-
</p>
140+
<pre><code>{{ htmlCode }}</code></pre>
141+
</div>
142142
</template>
143143
</NcSettingsSection>
144144
</template>

0 commit comments

Comments
 (0)