Commit Graph

35 Commits

Author SHA1 Message Date
GitLab Bot 46f49bc8e6 Add latest changes from gitlab-org/gitlab@master 2023-03-31 00:12:17 +00:00
GitLab Bot 9432ed8112 Add latest changes from gitlab-org/gitlab@master 2022-11-03 21:09:24 +00:00
GitLab Bot b267f3a3ac Add latest changes from gitlab-org/gitlab@master 2021-10-28 18:14:18 +00:00
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
blackst0ne aa60db6cee Add CommonMark markdown engine 2018-03-07 23:14:41 +11:00
Vitaliy @blackst0ne Klachkov 131e74d10d Add support of Mermaid 2017-11-22 14:12:04 +11:00
http://jneen.net/ c50cded96e remove the rouge copypasta and add notes to refactor 2017-06-07 17:49:03 -07: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
Horacio Sanson d9e9ad2211 PlantUML support for Markdown
Allow rendering of PlantUML diagrams in Markdown documents using fenced blocks:

    ```plantuml
    Bob -> Sara : Hello
    Sara -> Bob : Go away
    ```

Closes: #4048
2017-02-03 08:49:48 +09:00
Munken 2d170a20dc Render math in Asciidoc and Markdown with KaTeX using code blocks 2016-12-14 16:50:54 +00:00
Munken a36ee0ad44 Better location for math lexer 2016-12-08 23:13:44 +00: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