Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-09-11 00:21:14 +0300
committerStan Hu <stanhu@gmail.com>2015-09-11 00:24:10 +0300
commit267687993a437e0651eb5064c04479e65a43251f (patch)
treeaf67be0c81836856d3c810cc1f43687691f553b6 /lib
parentb2f3d024c3775f9d8dc293c433da103381ed6e45 (diff)
Add comments and clean up test for !1274
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/markdown/syntax_highlight_filter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/markdown/syntax_highlight_filter.rb b/lib/gitlab/markdown/syntax_highlight_filter.rb
index f9527c7286e..8597e02f0de 100644
--- a/lib/gitlab/markdown/syntax_highlight_filter.rb
+++ b/lib/gitlab/markdown/syntax_highlight_filter.rb
@@ -24,6 +24,8 @@ module Gitlab
begin
highlighted = block_code(code, language)
rescue
+ # Gracefully handle syntax highlighter bugs/errors to ensure
+ # users can still access an issue/comment/etc.
highlighted = "<pre>#{code}</pre>"
end