Commit 5104098f authored by Isaac Smith's avatar Isaac Smith

Fix #47796 "Web IDE autocomplete should be disabled in markdown files"

parent 15ad1a97
......@@ -12,5 +12,6 @@ export const defaultEditorOptions = {
export default [
{
readOnly: model => !!model.file.file_lock,
quickSuggestions: model => !(model.language === 'markdown'),
},
];
---
title: Disabled Web IDE autocomplete suggestions for Markdown files.
merge_request:
author: Isaac Smith
type: fixed
......@@ -263,4 +263,23 @@ describe('Multi-file editor library', () => {
expect(instance.isDiffEditorType).toBe(false);
});
});
it('sets quickSuggestions to false when language is markdown', () => {
instance.createInstance(holder);
spyOn(instance.instance, 'updateOptions').and.callThrough();
const model = instance.createModel({
...file(),
key: 'index.md',
path: 'index.md',
});
instance.attachModel(model);
expect(instance.instance.updateOptions).toHaveBeenCalledWith({
readOnly: false,
quickSuggestions: false,
});
});
});
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