Commit graph

14 commits

Author SHA1 Message Date
Robert Speicher
2fe13fbc4b Use :empty_project where possible in helper specs 2017-01-25 17:10:32 -05:00
Paco Guzman
938f3b2a0b edit_blob_link can receive the blob to avoid access to the repository 2016-08-18 16:30:25 +02:00
tiagonbotelho
519275c110 fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
Stan Hu
48ff40a047 Improve diff performance by eliminating redundant checks for text blobs
On a merge request with over 1000 changed files, there were redundant
calls to blob_text_viewable?, which incurred about 7% of the time.

Improves #14775
2016-07-29 21:06:50 -07:00
http://jneen.net/
c4ea394736 use %(...) and %[...] in favor of %<...> 2016-07-14 22:43:49 -07:00
http://jneen.net/
e0ee9dacd1 remove uses of the nowrap: feature 2016-07-14 10:08:16 -07:00
http://jneen.net/
001b1ff312 rm spec for a deleted method 2016-07-14 10:08:15 -07:00
Stan Hu
21d89d0286 Update SVG sanitizer to conform to SVG 1.1
Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate
to handle case-sensitive SVG attributes. sanitize parses documents as HTML
instead of XML, which causes all SVG attribute names (e.g. viewBox) to be downcased.

* SVG element list: https://www.w3.org/TR/SVG/eltindex.html
* SVG attribute list: https://www.w3.org/TR/SVG/attindex.html

Closes #14555
2016-05-06 23:20:24 -07:00
Douwe Maan
512bebe21d Refactor Gitlab::Highlight and fix tests 2016-01-19 14:52:41 +01:00
Rubén Dávila
bb96d63153 New implementation for highlighting diff files. #3945
* It is more performant given now we process all the diff file instead
  of processing line by line.
* Multiline comments are highlighted correctly.
2015-12-30 00:52:50 -05:00
Rubén Dávila
34657b821a Add syntax highlighting to diff view. #3945 2015-12-28 18:31:27 -05: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
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
Stan Hu
0cd73885e6 Fix git blame syntax highlighting when different commits break up lines
Closes #1521
2015-05-27 14:10:58 -07:00