gitlab-org--gitlab-foss/spec
Rémy Coutable 0d0f8a3b7d Merge branch 'feature/custom-highlighting' into 'master'
Add custom highlighting via .gitattributes

## What does this MR do?
Allows user control of language selection via a `gitlab-language` entry in `.gitattributes`

## Are there points in the code the reviewer needs to double check?
(paired with @stanhu)

## Why was this MR needed?
Guessing languages by filename is fraught and often wrong. In one project, `foo.pl` may be perl, and in another it may be prolog. Users might have a Thingfile that needs ruby highlighting, or depend on things that can't work in general, like `*.C` (capitalized) mapping to C++ instead of C.

This allows the user to override language choice so they never have to look at a mis-highlighted file.

## What are the relevant issue numbers?
https://github.com/jneen/rouge/issues/494
https://gitlab.com/gitlab-org/gitlab-ce/issues/13818 (*.tpl can't in general map to Smarty)
https://gitlab.com/gitlab-org/gitlab-ce/issues/13615 (in cases we don't have a language and mis-identify it, users could map to 'text' to turn off highlighting)

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added (N/A)
- [x] Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4606
2016-06-28 08:42:42 +00:00
..
config
controllers Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
factories Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project 2016-06-20 14:04:14 +00:00
features Merge branch '19102-fix' into 'master' 2016-06-27 18:41:31 +00:00
finders Revert "squashed merge and fixed conflicts" 2016-06-16 12:59:07 +02:00
fixtures Show proper image ID on registry page 2016-06-21 13:08:10 +02:00
helpers Remove Haml helpers from the visibility level spec. 2016-06-22 16:10:26 -06:00
initializers Fix settings_spec so that it can that run by itself 2016-06-23 22:26:33 -07:00
javascripts Merge branch 'emoji-menu-stick-search' into 'master' 2016-06-27 18:03:08 +00:00
lib support cgi style options, such as erb?parent=json 2016-06-27 14:17:49 -07:00
mailers Fallback to group's owners/masters when a project has none 2016-06-20 12:10:37 +02:00
models Merge remote-tracking branch 'dev/master' 2016-06-27 18:39:42 -04:00
requests Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
routing
services Merge branch 'fix-18997' into 'master' 2016-06-27 18:43:12 +00:00
support support cgi style options, such as erb?parent=json 2016-06-27 14:17:49 -07:00
tasks/gitlab
views
workers Unify check branch name exist 2016-06-20 21:44:21 +02:00
factories_spec.rb
rails_helper.rb
spec_helper.rb
teaspoon_env.rb