File tree 3 files changed +3
-1
lines changed
3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
## 2.0.3
2
2
### Bug fixes
3
+ - fix: rendering emojis
3
4
- fix: css var polyfill
4
5
5
6
## 2.0.2
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export function init () {
39
39
renderer . code = function ( code , lang = '' ) {
40
40
const hl = Prism . highlight ( code , Prism . languages [ lang ] || Prism . languages . markup )
41
41
42
- return `<pre v-pre data-lang="${ lang } "><code class="lang-${ lang } ">${ hl . replace ( / : / g , '__colon__' ) } </code></pre>`
42
+ return `<pre v-pre data-lang="${ lang } "><code class="lang-${ lang } ">${ hl } </code></pre>`
43
43
}
44
44
renderer . link = function ( href , title , text ) {
45
45
if ( ! / : / . test ( href ) ) {
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ export const merge = Object.assign || function (to) {
160
160
161
161
export function emojify ( text ) {
162
162
return text
163
+ . replace ( / < ( p r e | t e m p l a t e ) [ ^ > ] * ?> ( [ \s \S ] + ) < \/ ( p r e | t e m p l a t e ) > / g, match => match . replace ( / : / g, '__colon__' ) )
163
164
. replace ( / : ( \w * ?) : / ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />' )
164
165
. replace ( / _ _ c o l o n _ _ / g, ':' )
165
166
}
You can’t perform that action at this time.
0 commit comments