Skip to content

Commit

Permalink
Fix markdown-it initialization to use real commonmark (fix #604)
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Jan 18, 2018
1 parent cf85d91 commit fbe449e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Current (in progress)

- Nothing yet
- Markdown rendering is now the same between the back and the frontend. [#604](https://github.com/opendatateam/udata/issues/604)

## 1.2.9 (2018-01-17)

Expand Down
4 changes: 2 additions & 2 deletions js/helpers/commonmark.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import markdownit from 'markdown-it';
import { options } from 'markdown-it/lib/presets/commonmark';
import { options, components } from 'markdown-it/lib/presets/commonmark';

options.linkify = true;
const markdown = markdownit(options);
const markdown = markdownit().configure({options, components}).enable('linkify');

export default function(text) {
return markdown.render(text);
Expand Down

0 comments on commit fbe449e

Please sign in to comment.