BigW Consortium Gitlab

Commit 84e23ae0 by Eric Eastwood

Fix issue description syntax highlighting and math rendering

parent e4eeba4e
......@@ -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