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
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-06-15 21:52:23 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2016-07-14 20:08:14 +0300
commit7214a221e082c569b4804eb4729e097d4e4b069c (patch)
tree3a108ff9466098f597a754a06dceae0fca9e45ea /app/helpers/blob_helper.rb
parente2c9770e03681edafe14212d3db1035a675ba47d (diff)
kill the nowrap option
the <pre><code> wrapping is *always* used by the helper, and *never* by anywhere else, so pull the wrapping into the helper
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index d639a56f487..39f9f935d31 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -1,6 +1,7 @@
module BlobHelper
- def highlight(blob_name, blob_content, repository: nil, nowrap: false, plain: false)
- Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, plain: plain, repository: repository)
+ def highlight(blob_name, blob_content, repository: nil, plain: false)
+ highlighted = Gitlab::Highlight.highlight(blob_name, blob_content, plain: plain, repository: repository)
+ raw %<<pre class="code highlight"><code>#{highlighted}</code></pre>>
end
def no_highlight_files