Commit Graph

26 Commits

Author SHA1 Message Date
GitLab Bot 4d16568658 Add latest changes from gitlab-org/gitlab@master 2021-03-18 06:11:52 +00:00
GitLab Bot d7774ee304 Add latest changes from gitlab-org/gitlab@master 2021-02-01 18:09:17 +00:00
GitLab Bot 74d35955aa Add latest changes from gitlab-org/gitlab@master 2020-11-06 03:09:19 +00:00
Patrick Bajao 6d318af5f9 Revert "Merge branch '65152-selective-highlight' into 'master'"
This reverts merge request !31361
2019-08-09 00:13:09 +00:00
Patrick Bajao 46631e1023 Support selective highlighting of lines
Instead of highlighting all lines when not all of them are
needed, only highlight specific lines.

The `BlobPresenter#highlight` method has been updated to
support `since` and `to` params. These params will be used to
limit the content to be highlighted.

Modify `Gitlab::Highlight` to support `since` param which will
then be used to determine the starting line number.
2019-08-06 09:32:29 +08:00
gfyoung c8755543f0 Enable even more frozen string in lib/**/*.rb
Enables frozen string for the following files:

* lib/generators/**/*.rb
* lib/gitaly/**/*.rb
* lib/google_api/**/*.rb
* lib/haml_lint/**/*.rb
* lib/json_web_token/**/*.rb
* lib/mattermost/**/*.rb
* lib/microsoft_teams/**/*.rb
* lib/object_storage/**/*.rb
* lib/omni_auth/**/*.rb
* lib/peek/**/*.rb
* lib/rouge/**/*.rb
* lib/rspec_flaky/**/*.rb
* lib/system_check/**/*.rb

Partially addresses #47424.
2018-10-08 11:16:49 -07:00
Lin Jen-Shin 3bfe306624 Resolve Naming/UncommunicativeMethod 2018-07-09 21:13:08 +08:00
Douwe Maan 6685cbeb99 Document tag option and clarify spec 2017-03-14 15:29:00 -06:00
Douwe Maan 6890327762 Copy code as GFM from diffs, blobs and GFM code blocks 2017-03-14 15:29:00 -06:00
Stan Hu 3fe18525dd Trim extra displayed carriage returns in diffs and files with CRLFs
Closes #20440
2016-08-01 13:24:06 +02:00
http://jneen.net/ c4ea394736 use %(...) and %[...] in favor of %<...> 2016-07-14 22:43:49 -07:00
http://jneen.net/ d625f65291 eliminate the final newline in <pre> blocks 2016-07-14 10:08:15 -07:00
http://jneen.net/ 4365144f5c no longer need cgi 2016-07-14 10:08:15 -07:00
http://jneen.net/ e1824aa101 use the new token_lines interface to format lines 2016-07-14 10:08:15 -07:00
http://jneen.net/ 3bb65815b0 kill the :cssclass option 2016-07-14 10:08:15 -07:00
http://jneen.net/ 55dc7d09b3 trim more dead code 2016-07-14 10:08:15 -07:00
http://jneen.net/ 504a048b08 remove the dead linenos and linenostart options
and the methods that relied on them
2016-07-14 10:08:15 -07:00
http://jneen.net/ 2ae837f9c9 kill the nowrap option in HTMLGitlab itself 2016-07-14 10:08:14 -07:00
http://jneen.net/ 95d6174a08 remove the unused inline_theme feature 2016-07-14 10:08:14 -07:00
http://jneen.net/ 96c68c5033 deprecate @anchorlinenos 2016-07-14 10:08:14 -07:00
Grzegorz Bizon c6f9a1c273 Enable Style/IdenticalConditionalBranches Rubocop cop 2016-07-08 11:04:04 +02:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Stan Hu 15d5dfdb33 Fix diff syntax highlighting
Refactored HTML parser to avoid duplication of newline parsing.

Closes #2235
2015-08-10 08:07:26 -07:00
Robert Speicher fa5efea7f3 Fix the `inline_theme` option for the Rouge formatter 2015-08-01 19:10:14 -04:00
Stan Hu 0abe98f049 Fix multi-line syntax highlighting
HTML span elements only apply to a single line, and in the case of multi-line
comments, the highlighting was dropped as a result. Ensure that each line has
the proper styling to fix this.

Closes #1577
2015-07-30 22:37:53 -07:00
Stefan Tatschner 00ff84d3c0 Add HTMLGitlab formatter
This custom formatter for rouge is needed to generate HTML output
specifically for gitlab. Since its usecase is mostly suitable for
gitlab it had been rejected upstream:
https://github.com/jneen/rouge/pull/268

Thanks a lot to @stanhu, @jneen and @tsigo for review!
2015-07-29 08:32:00 +02:00