Skip to content

Commit

Permalink
fix: content line break (#47)
Browse files Browse the repository at this point in the history
Switch p tags to pre tags to solve line break issues.
```
Fixed the line break issue
```
  • Loading branch information
wsj20010128 committed Jul 12, 2023
1 parent a8b3bc0 commit 6a0909b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/comment-widget/src/components/CommentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ const handleUpvote = async () => {
</div>
</div>
<div class="comment-content mt-2">
<p class="text-sm text-gray-800 dark:text-slate-200">
{{ comment?.spec.content }}
</p>
<pre class="text-sm text-gray-800 dark:text-slate-200">{{
comment?.spec.content
}}</pre>
</div>
<div class="comment-actions mt-2 flex flex-auto items-center gap-1.5">
<div
Expand Down
10 changes: 4 additions & 6 deletions packages/comment-widget/src/components/ReplyItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ const handleUpvote = async () => {
</div>
</div>
<div class="reply-content mt-2">
<p class="text-sm text-gray-800 dark:text-slate-200">
<a
<pre class="text-sm text-gray-800 dark:text-slate-200"><a
v-if="quoteReply"
class="mr-1 inline-flex flex-row items-center gap-1 rounded bg-gray-200 py-0.5 px-1 text-xs font-medium text-gray-600 hover:text-blue-500 hover:underline dark:bg-slate-700 dark:text-slate-200 dark:hover:text-slate-100"
:href="`#reply-${quoteReply.metadata.name}`"
Expand All @@ -139,10 +138,9 @@ const handleUpvote = async () => {
>
<MdiReply />
<span>{{ quoteReply.owner.displayName }}</span>
</a>
<br v-if="quoteReply" />
{{ reply.spec.content }}
</p>
</a><br v-if="quoteReply" />{{
reply.spec.content
}}</pre>
</div>
<div class="reply-actions mt-2 flex flex-auto items-center gap-1">
<div
Expand Down

0 comments on commit 6a0909b

Please sign in to comment.