Commit 27664b7d authored by Phil Hughes's avatar Phil Hughes

Merge branch '33877-fix-issue-description-highlight-and-math' into 'master'

Fix issue description syntax highlighting and math rendering

Closes #33877

See merge request !12282
parents 521840a4 84e23ae0
......@@ -53,7 +53,7 @@
},
methods: {
renderGFM() {
$(this.$refs['gfm-entry-content']).renderGFM();
$(this.$refs['gfm-content']).renderGFM();
if (this.canUpdate) {
// eslint-disable-next-line no-new
......
......@@ -96,4 +96,20 @@ describe('Description component', () => {
});
});
});
it('applies syntax highlighting and math when description changed', (done) => {
spyOn(vm, 'renderGFM').and.callThrough();
spyOn($.prototype, 'renderGFM').and.callThrough();
vm.descriptionHtml = 'changed';
Vue.nextTick(() => {
setTimeout(() => {
expect(vm.$refs['gfm-content']).toBeDefined();
expect(vm.renderGFM).toHaveBeenCalled();
expect($.prototype.renderGFM).toHaveBeenCalled();
done();
});
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment