From 2c007ff36fd7f05d470dd0f60bf1538858c04b12 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 24 Feb 2018 07:54:37 +0900 Subject: [PATCH] Fix #1130 --- .../app/common/views/components/post-html.ts | 6 ++- .../desktop/views/components/posts.post.vue | 49 +++++++++---------- .../mobile/views/components/posts.post.vue | 28 ++++++----- 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/web/app/common/views/components/post-html.ts b/src/web/app/common/views/components/post-html.ts index 37954cd7e..adb025589 100644 --- a/src/web/app/common/views/components/post-html.ts +++ b/src/web/app/common/views/components/post-html.ts @@ -81,7 +81,11 @@ export default Vue.component('mk-post-html', { case 'code': return createElement('pre', [ - createElement('code', token.html) + createElement('code', { + domProps: { + innerHTML: token.html + } + }) ]); case 'inline-code': diff --git a/src/web/app/desktop/views/components/posts.post.vue b/src/web/app/desktop/views/components/posts.post.vue index 4ae980648..4898de0b6 100644 --- a/src/web/app/desktop/views/components/posts.post.vue +++ b/src/web/app/desktop/views/components/posts.post.vue @@ -37,7 +37,7 @@ {{ p.channel.title }}:

%fa:reply% - + RP: @@ -413,9 +413,6 @@ export default Vue.extend({ font-size 1.1em color #717171 - > .dummy - display none - .mk-url-preview margin-top 8px @@ -431,27 +428,6 @@ export default Vue.extend({ font-style oblique color #a0bf46 - code - padding 4px 8px - margin 0 0.5em - font-size 80% - color #525252 - background #f8f8f8 - border-radius 2px - - pre > code - padding 16px - margin 0 - - [data-is-me]:after - content "you" - padding 0 4px - margin-left 4px - font-size 80% - color $theme-color-foreground - background $theme-color - border-radius 4px - > .mk-poll font-size 80% @@ -505,3 +481,26 @@ export default Vue.extend({ + diff --git a/src/web/app/mobile/views/components/posts.post.vue b/src/web/app/mobile/views/components/posts.post.vue index 87b8032c8..ae1dfc59a 100644 --- a/src/web/app/mobile/views/components/posts.post.vue +++ b/src/web/app/mobile/views/components/posts.post.vue @@ -34,7 +34,7 @@ %fa:reply% - + RP: @@ -364,18 +364,6 @@ export default Vue.extend({ font-style oblique color #a0bf46 - code - padding 4px 8px - margin 0 0.5em - font-size 80% - color #525252 - background #f8f8f8 - border-radius 2px - - pre > code - padding 16px - margin 0 - [data-is-me]:after content "you" padding 0 4px @@ -445,3 +433,17 @@ export default Vue.extend({ +