Modified markdown lexer to not break up words written in snake_case

Этот коммит содержится в:
hmhealey
2015-10-08 18:18:51 -04:00
родитель a0febe2f31
Коммит 787d2ef7bc
2 изменённых файлов: 39 добавлений и 8 удалений

Просмотреть файл

@@ -8,8 +8,6 @@ const Markdown = require('./markdown.jsx');
const UserStore = require('../stores/user_store.jsx');
const Utils = require('./utils.jsx');
const marked = require('marked');
// Performs formatting of user posts including highlighting mentions and search terms and converting urls, hashtags, and
// @mentions to links by taking a user's message and returning a string of formatted html. Also takes a number of options
// as part of the second parameter:
@@ -22,11 +20,8 @@ export function formatText(text, options = {}) {
let output;
if (!('markdown' in options) || options.markdown) {
// the markdown renderer will call doFormatText as necessary so just call marked
output = marked(text, {
renderer: new Markdown.MattermostMarkdownRenderer(null, options),
sanitize: true
});
// the markdown renderer will call doFormatText as necessary
output = Markdown.format(text, options);
} else {
output = sanitizeHtml(text);
output = doFormatText(output, options);