summaryrefslogtreecommitdiff
path: root/lib/redcarpet/render/gitlab_html.rb
Commit message (Collapse)AuthorAgeFilesLines
* Decouple Gitlab::Markdown from the GitlabMarkdownHelperRobert Speicher2015-08-271-45/+0
| | | | | This module is now the sole source of knowledge for *how* we render Markdown (and GFM).
* Remove user_color_scheme_classRobert Speicher2015-08-251-3/+2
| | | | | | | | | Instead of rendering this value server-side, we use Javascript and Gon to apply the user's color scheme (or the default) to any syntax highlighted code blocks. This will make it easier to cache these blocks in the future because they're no longer state-dependent.
* Remove the `gfm_with_options` helperrs-remove-gfm_with_optionsRobert Speicher2015-08-121-1/+1
| | | | It was redundant because `gfm` also took options.
* Replace Rugments with RougeStefan Tatschner2015-07-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Fix typo.Douwe Maan2015-06-021-1/+1
|
* Actually ignore references in code blocks etc.Douwe Maan2015-06-021-0/+2
|
* Fix reference links in dashboard activity and ATOM feeds.dashboard-referencesDouwe Maan2015-05-141-1/+4
|
* Extract handling of relative file links to RelativeLinkFilterJakub Jirutka2015-05-111-4/+0
|
* Remove special handling for the `'` problemRobert Speicher2015-04-301-12/+1
| | | | | | While `escape_once` will create this HTML entity, Nokogiri always translates it back before it gets to IssueReferenceFilter, so there should be no danger of erroneous issue links.
* Escape normal text in our Redcarpet rendererRobert Speicher2015-04-301-1/+3
|
* Add Gitlab::Markdown::AutolinkFilterRobert Speicher2015-04-301-13/+5
|
* Add Gitlab::Markdown::TableOfContentsFilterRobert Speicher2015-04-301-10/+0
| | | | Removes header and table of contents processing from Redcarpet renderer.
* Merge branch 'atom-xhtml-squashed' into 'master'Douwe Maan2015-03-171-5/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix invalid Atom feeds when using emoji, horizontal rules, or images This is a fix for issues #880, #723, #1113. Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like *img* and *hr* are not terminated and make the Atom XML invalid. Such tags are generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images. To pass this option through from the relevant Haml templates to the proper place in the `gfm()` method, a new method `gfm_with_options()` is introduced. It reuses the options dictionary passed to `markdown()` and interprets options `xhtml` and `parse_tasks` from it (the latter was a convenient replacement for `gfm_with_tasks()`). `xhtml` is already interpreted by Redcarpet::Render::HTML, but that alone was not sufficient, because the post-processing in `gfm()` would convert its XHTML tags back to HTML. I found no way of passing additional optional options to the existing `gfm()` method without requiring updates to existing callers and without getting in the way of the existing optional arguments, but maybe someone who knows more about Ruby than I can think of one. Thorough review appreciated since this is the first time I have used Ruby. See merge request !344
| * Fix invalid Atom feeds when using emoji, horizontal rules, or images.Christian Walther2015-03-161-5/+1
| | | | | | | | Fixes issues #880, #723, #1113: Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like <img> and <hr>, generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images, are not terminated and make the Atom XML invalid.
* | Merge branch 'markdown-smb-link' into 'master'Dmitriy Zaporozhets2015-03-121-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | Allow smb:// links in Markdown text. As requested by Sam McLeod at https://gitlab.com/gitlab-org/gitlab-ce/issues/1184 See merge request !1669
| * | Allow smb:// links in Markdown text.Douwe Maan2015-03-101-0/+8
| |/
* | Fix code preview theme setting for comments, issues, merge requests, and ↵Stan Hu2015-03-101-2/+3
|/ | | | | | | | | | snippets. Also preserve code preview color scheme in events dashboard. Assign default colors to all code blocks shown as <pre class="code highlight [color_scheme]"> Closes #1139
* Replace highlight.js with rouge-fork rugmentsStefan Tatschner2015-01-151-14/+13
| | | | | | | | | | 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.
* Add a comment why this is done.Marin Jankovski2014-10-101-0/+6
|
* Substitute right single quote back with apostrophe.Marin Jankovski2014-10-101-0/+1
|
* Replace apostrophe with right single quote to avoid markdown interpretation ↵Marin Jankovski2014-10-091-0/+5
| | | | as issue 39.
* Add task lists to issues and merge requestsVinnie Okada2014-10-051-1/+5
| | | | | | | | Make the Markdown parser recognize "[x]" or "[ ]" at the beginning of a list item and turn it into a checkbox input. Users who can modify the issue or MR can toggle the checkboxes directly or edit the Markdown to manage the tasks. Task status is also displayed in the MR and issue lists.
* Add feature spec.Marin Jankovski2014-05-261-3/+3
|
* Do not replace links inside code blocks, less code for the same amount of work.Marin Jankovski2014-05-261-16/+1
|
* Use ProjectWiki instead of GollumWiki in codeDmitriy Zaporozhets2014-04-091-1/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Wiki will show relative links related to the wiki gollum repository.Marin Jankovski2014-03-171-2/+4
|
* html_escape is private for rails 4.0.2 :(Dmitriy Zaporozhets2014-02-271-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Enable html_escape for code blocks highlighted in markdownDmitriy Zaporozhets2014-02-271-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Headers have ids and link to their own id.Ciro Santillli2014-02-111-0/+11
|
* Improve highlight for notesDmitriy Zaporozhets2014-01-271-3/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add highlight.js support to markdown, snippets etcDmitriy Zaporozhets2014-01-271-5/+7
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Correct check.Marin Jankovski2013-11-081-1/+1
|
* Skip relative links render in help page.Marin Jankovski2013-10-111-1/+5
|
* Cover a special case.Marin Jankovski2013-10-101-1/+2
|
* Check for wiki.Marin Jankovski2013-10-081-1/+5
|
* Show links with correct ref.Marin Jankovski2013-10-081-1/+2
|
* Search and replace relative links in tree/readmeMarin Jankovski2013-10-081-0/+4
|
* Fix Pygments 500 error if lexer not found by name. Use first alias instead. ↵Robert Schilling2013-07-071-1/+1
| | | | fixes #4473, #4451
* Fix pygment lexer 500 errors when an alias is used instead of a name.Sytse Sijbrandij2013-06-091-1/+2
|
* Fix parsing of ref-like Urls in links and images in GFMRiyad Preukschas2013-01-161-0/+4
| | | | Fixes #2166
* Fixed wierd gitlab markdown issueDmitriy Zaporozhets2012-12-221-3/+10
|
* Improve wiki rendering. Fix pygemnt + markdown invalid htmlDmitriy Zaporozhets2012-12-221-7/+6
|
* Fix code blocks in Markdown not knowing about the user's color schemeRiyad Preukschas2012-11-271-4/+6
|
* Fix 500s because of "missing" lexerRiyad Preukschas2012-11-101-2/+4
|
* Fully embrace Ruby 1.9 hash syntaxRobert Speicher2012-08-101-2/+2
| | | | Didn't bother with files in db/, config/, or features/
* Update Gitlab Markdown renderer to use GFMRiyad Preukschas2012-08-021-0/+4
|
* Add render context to markdown rendererRiyad Preukschas2012-08-011-0/+10
|
* specify utf-8 encoding for pygments.rb markdown wrapperNihad Abbasov2012-06-081-3/+3
|
* Switch to Redcarpet for Markdown Rendering.Arthur Schreiber2012-04-201-0/+9
This gives us Github Flavored Markdown, which is awesome.