diff options
author | Yusuke Nemoto <stooner.hoe@gmail.com> | 2016-10-05 22:34:03 +0900 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-10-05 10:34:03 -0300 |
commit | 26099d89e9cc787a1c077a89a153ffbb2ea21254 (patch) | |
tree | b27218ee2f39e113375760e3494bea78bd6293c9 | |
parent | cd5bf7cb5a328f9c267abfd4083d395fbe559a64 (diff) | |
download | chat-26099d89e9cc787a1c077a89a153ffbb2ea21254.tar.gz chat-26099d89e9cc787a1c077a89a153ffbb2ea21254.tar.bz2 chat-26099d89e9cc787a1c077a89a153ffbb2ea21254.zip |
PLT-3487 Preview uploaded txt file (#4145)
* fix filename
* Add 'txt' to hilighted language
-rw-r--r-- | webapp/components/code_preview.jsx | 2 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 3 | ||||
-rw-r--r-- | webapp/utils/markdown.jsx | 2 | ||||
-rw-r--r-- | webapp/utils/syntax_highlighting.jsx (renamed from webapp/utils/syntax_hightlighting.jsx) | 0 |
4 files changed, 4 insertions, 3 deletions
diff --git a/webapp/components/code_preview.jsx b/webapp/components/code_preview.jsx index 852b26e25..46782cd2d 100644 --- a/webapp/components/code_preview.jsx +++ b/webapp/components/code_preview.jsx @@ -4,7 +4,7 @@ import $ from 'jquery'; import React from 'react'; -import * as SyntaxHighlighting from 'utils/syntax_hightlighting.jsx'; +import * as SyntaxHighlighting from 'utils/syntax_highlighting.jsx'; import Constants from 'utils/constants.jsx'; import FileInfoPreview from './file_info_preview.jsx'; diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 2b6e110ce..10f1a2879 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -261,7 +261,7 @@ export const Constants = { PRESENTATION_TYPES: ['ppt', 'pptx'], SPREADSHEET_TYPES: ['xlsx', 'csv'], WORD_TYPES: ['doc', 'docx'], - CODE_TYPES: ['as', 'applescript', 'osascript', 'scpt', 'bash', 'sh', 'zsh', 'clj', 'boot', 'cl2', 'cljc', 'cljs', 'cljs.hl', 'cljscm', 'cljx', 'hic', 'coffee', '_coffee', 'cake', 'cjsx', 'cson', 'iced', 'cpp', 'c', 'cc', 'h', 'c++', 'h++', 'hpp', 'cs', 'csharp', 'css', 'd', 'di', 'dart', 'delphi', 'dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm', 'diff', 'django', 'jinja', 'dockerfile', 'docker', 'erl', 'f90', 'f95', 'fsharp', 'fs', 'gcode', 'nc', 'go', 'groovy', 'handlebars', 'hbs', 'html.hbs', 'html.handlebars', 'hs', 'hx', 'java', 'jsp', 'js', 'jsx', 'json', 'jl', 'kt', 'ktm', 'kts', 'less', 'lisp', 'lua', 'mk', 'mak', 'md', 'mkdown', 'mkd', 'matlab', 'm', 'mm', 'objc', 'obj-c', 'ml', 'perl', 'pl', 'php', 'php3', 'php4', 'php5', 'php6', 'ps', 'ps1', 'pp', 'py', 'gyp', 'r', 'ruby', 'rb', 'gemspec', 'podspec', 'thor', 'irb', 'rs', 'scala', 'scm', 'sld', 'scss', 'st', 'sql', 'swift', 'tex', 'vbnet', 'vb', 'bas', 'vbs', 'v', 'veo', 'xml', 'html', 'xhtml', 'rss', 'atom', 'xsl', 'plist', 'yaml'], + CODE_TYPES: ['as', 'applescript', 'osascript', 'scpt', 'bash', 'sh', 'zsh', 'clj', 'boot', 'cl2', 'cljc', 'cljs', 'cljs.hl', 'cljscm', 'cljx', 'hic', 'coffee', '_coffee', 'cake', 'cjsx', 'cson', 'iced', 'cpp', 'c', 'cc', 'h', 'c++', 'h++', 'hpp', 'cs', 'csharp', 'css', 'd', 'di', 'dart', 'delphi', 'dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm', 'diff', 'django', 'jinja', 'dockerfile', 'docker', 'erl', 'f90', 'f95', 'fsharp', 'fs', 'gcode', 'nc', 'go', 'groovy', 'handlebars', 'hbs', 'html.hbs', 'html.handlebars', 'hs', 'hx', 'java', 'jsp', 'js', 'jsx', 'json', 'jl', 'kt', 'ktm', 'kts', 'less', 'lisp', 'lua', 'mk', 'mak', 'md', 'mkdown', 'mkd', 'matlab', 'm', 'mm', 'objc', 'obj-c', 'ml', 'perl', 'pl', 'php', 'php3', 'php4', 'php5', 'php6', 'ps', 'ps1', 'pp', 'py', 'gyp', 'r', 'ruby', 'rb', 'gemspec', 'podspec', 'thor', 'irb', 'rs', 'scala', 'scm', 'sld', 'scss', 'st', 'sql', 'swift', 'tex', 'txt', 'vbnet', 'vb', 'bas', 'vbs', 'v', 'veo', 'xml', 'html', 'xhtml', 'rss', 'atom', 'xsl', 'plist', 'yaml'], PDF_TYPES: ['pdf'], PATCH_TYPES: ['patch'], ICON_FROM_TYPE: { @@ -772,6 +772,7 @@ export const Constants = { sql: {name: 'SQL', extensions: ['sql']}, swift: {name: 'Swift', extensions: ['swift']}, tex: {name: 'TeX', extensions: ['tex']}, + text: {name: 'Text', extensions: ['txt']}, vbnet: {name: 'VB.Net', extensions: ['vbnet', 'vb', 'bas']}, vbscript: {name: 'VBScript', extensions: ['vbs']}, verilog: {name: 'Verilog', extensions: ['v', 'veo']}, diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx index 9c2eb47aa..7f597eb3d 100644 --- a/webapp/utils/markdown.jsx +++ b/webapp/utils/markdown.jsx @@ -2,7 +2,7 @@ // See License.txt for license information. import * as TextFormatting from './text_formatting.jsx'; -import * as SyntaxHighlighting from './syntax_hightlighting.jsx'; +import * as SyntaxHighlighting from './syntax_highlighting.jsx'; import marked from 'marked'; import katex from 'katex'; diff --git a/webapp/utils/syntax_hightlighting.jsx b/webapp/utils/syntax_highlighting.jsx index 47ba5bd4e..47ba5bd4e 100644 --- a/webapp/utils/syntax_hightlighting.jsx +++ b/webapp/utils/syntax_highlighting.jsx |