Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
πŸ› fix editor fenced code block handling (#781)
Browse files Browse the repository at this point in the history
closes TryGhost/Ghost#8695
- non-spellchecker mode should be "gfm" not "markdown" so that fenced
code blocks are displayed correctly and other markdown behaviour better
matches the preview/rendering
  • Loading branch information
kevinansfield authored and aileen committed Jul 20, 2017
1 parent ab67f40 commit 5e85cbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/gh-markdown-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default Component.extend(ShortcutsMixin, {
let cm = this._editor.codemirror;

if (cm.getOption('mode') === 'spell-checker') {
cm.setOption('mode', 'markdown');
cm.setOption('mode', 'gfm');
} else {
cm.setOption('mode', 'spell-checker');
}
Expand Down Expand Up @@ -373,7 +373,7 @@ export default Component.extend(ShortcutsMixin, {
this._editor.codemirror.setOption('dragDrop', false);

// default to spellchecker being off
this._editor.codemirror.setOption('mode', 'markdown');
this._editor.codemirror.setOption('mode', 'gfm');

// HACK: move the toolbar & status bar elements outside of the
// editor container so that they can be aligned in fixed positions
Expand Down

0 comments on commit 5e85cbe

Please sign in to comment.