File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
website/src/SimpleCodeEditor Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -210,13 +210,15 @@ const CodeEditor = {
210210 highlight : {
211211 mounted ( el , binding ) {
212212 el . textContent = binding . value ;
213+ el . removeAttribute ( 'data-highlighted' ) ;
213214 hljs . highlightElement ( el ) ;
214215 } ,
215216 updated ( el , binding ) {
216217 if ( el . scrolling ) {
217218 el . scrolling = false ;
218219 } else {
219220 el . textContent = binding . value ;
221+ el . removeAttribute ( 'data-highlighted' ) ;
220222 hljs . highlightElement ( el ) ;
221223 }
222224 } ,
Original file line number Diff line number Diff line change @@ -216,13 +216,15 @@ export default {
216216 highlight: {
217217 mounted (el , binding ) {
218218 el .textContent = binding .value ;
219+ el .removeAttribute (' data-highlighted' );
219220 hljs .highlightElement (el);
220221 },
221222 updated (el , binding ) {
222223 if (el .scrolling ) {
223224 el .scrolling = false ;
224225 } else {
225226 el .textContent = binding .value ;
227+ el .removeAttribute (' data-highlighted' );
226228 hljs .highlightElement (el);
227229 }
228230 },
Original file line number Diff line number Diff line change @@ -216,13 +216,15 @@ export default {
216216 highlight: {
217217 mounted (el , binding ) {
218218 el .textContent = binding .value ;
219+ el .removeAttribute (' data-highlighted' );
219220 hljs .highlightElement (el);
220221 },
221222 updated (el , binding ) {
222223 if (el .scrolling ) {
223224 el .scrolling = false ;
224225 } else {
225226 el .textContent = binding .value ;
227+ el .removeAttribute (' data-highlighted' );
226228 hljs .highlightElement (el);
227229 }
228230 },
You can’t perform that action at this time.
0 commit comments