Commit graph

14 commits

Author SHA1 Message Date
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
Stefan Tatschner
f736721c5b Replace Rugments with Rouge
I have mainly created the rugments fork for the purpose of improving
gitlab's highlighting. Nowadays IMO it works way better than the old
highlight.js solution. But the development is stuck on my side because
of a couple of personal reasons:

  * I have finished my studies; last months I was writing my master
    thesis. So there was a huge time problem. I am sorry for that.

  * I had to move to Munich due to getting a (paid) job. Searching a
    flat here is horrible... :)

  * Last but not least, maintaining the same code base in two seperate
    projects is a mess.

I have decided to switch back to rouge due to several reasons:

  * In the beginning I was quite motivated, but since I start
    working on my new job next week, the best solution IMO is
    switching back to upstream rouge.

  * Rouge is continously improving:
    https://github.com/jneen/rouge/blob/master/CHANGELOG.md
    http://rouge.jneen.net/

  * There should be absolutely no regressions with this change. Most
    likely this pull request will almost fix some minor bugs.

  * One less gem in gitlab is a good thing. since Gitlab is quite a
    huge bundle of gems. Reducing complexity should be a major
    milestone.

Thanks a lot to @stanhu and @jneen for the review!
2015-07-29 07:40:58 +02:00
Stan Hu
0cd73885e6 Fix git blame syntax highlighting when different commits break up lines
Closes #1521
2015-05-27 14:10:58 -07:00
Hannes Rosenögger
dfce7b62f7 workaround for buggy lexers
if something goes wrong, fall back to the plaintext lexer
2015-05-20 16:16:27 +02:00
Jakub Jirutka
daa0925016 Rename MarkdownHelper to MarkupHelper 2015-05-18 22:51:56 +02:00
Sullivan SENECHAL
8ef7220c23 Improve file icons rendering on tree 2015-03-28 16:49:05 +01:00
Vinnie Okada
9e9ce95d62 Merge branch 'master' into rails-4.1.9
Conflicts:
	app/views/dashboard/_project.html.haml
	app/views/events/event/_common.html.haml
	app/views/explore/projects/_project.html.haml
	app/views/groups/_projects.html.haml
	app/views/projects/_home_panel.html.haml
	app/views/projects/_issues_nav.html.haml
	app/views/projects/issues/_discussion.html.haml
	app/views/projects/issues/_issues.html.haml
	app/views/projects/issues/show.html.haml
	app/views/projects/merge_requests/_discussion.html.haml
	app/views/projects/merge_requests/_show.html.haml
	app/views/projects/milestones/index.html.haml
	app/views/projects/notes/_edit_form.html.haml
	app/views/shared/_issuable_filter.html.haml
2015-02-19 20:53:05 -07:00
Sytse Sijbrandij
a6a9cc6245 Merge branch 'no-highlight-files' into 'master'
Add "NEWS" to no_highlight_files

"NEWS" is used in gnu style opensource projects for the changelog. So let's add it to `no_highlight_files`.

See merge request !249
2015-02-18 17:58:36 +00:00
Vinnie Okada
76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Dmitriy Zaporozhets
21297e78af Refactor blob helpers 2015-01-26 15:03:14 -08:00
Stefan Tatschner
bf079c24af Replace highlight.js with rouge-fork rugments
I decided to create a fork of rouge as rouge lacks a HTML formatter with
the required options such as wrapping a line with <span> tags.
Furthermore I was not really convinced about the clarity of rouge's
source code.

Rugments 1.0.0beta3 for now only includes some basic linting and a new
HTML formatter. Everything else should behave the same.
2015-01-15 13:41:11 +01:00
Stefan Tatschner
8049779335 Added "news" to no_highlight_files 2014-12-03 12:50:00 +01:00
Zertrin
b8fcaa7f41 revert using the extension of the blob to determine the syntax highlighting language
nohighlight functionality for a hardcoded set of filenames is kept
2014-11-18 12:55:22 +01:00
Dmitriy Zaporozhets
0d13abb1c8
Specify language detection for highlight.js
Because I am tired of CHANGELOG highlighted as sql file :)

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-07 15:46:58 +03:00