Commit Graph
76 Commits
Author SHA1 Message Date
Vinnie Okada 1dc90fc455 Fix nested task lists
When nesting task list items, the parent item is wrapped in a `<p>` tag.
Update the task list parser to handle these paragraph wrappers.
2015-03-21 08:45:28 -06:00
Douwe Maan e4ac6bbf82 Merge branch 'atom-xhtml-squashed' into 'master'
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
2015-03-17 08:38:38 +00:00
Christian Walther 90aa870c36 Fix invalid Atom feeds when using emoji, horizontal rules, or images.
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.
2015-03-16 22:05:52 +01:00
Douwe Maan 31fc73f0a9 Use project_member instead of team_member. 2015-03-15 13:50:38 +01:00
Douwe Maan 4dddaef866 Automatically link commit ranges to compare page. 2015-03-07 00:46:13 +01:00
Nicolas Bouilleaud 8d0690c5c7 Support names starting with a digit or _ for projects and users
This is what’s actually allowed when creating a user or a project in gitlab.
2015-03-02 11:01:17 +01: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
Nikita Verkhovin 8681cb3137 Add labels notes 2015-02-08 22:35:41 +06:00
Douwe Maan 9910b7ff99 Allow groups to be mentioned.
Resolves #1673.
2015-02-05 19:10:52 +01:00
Marin Jankovski 00a0d5aeea Move repetition to the parent. 2015-01-26 16:24:11 -08:00
Marin Jankovski 65e700472b Update the issue tracker attribute on issue tracker change. 2015-01-26 11:39:32 -08:00
Marin Jankovski 7c701acf57 Do a check which issue tracker is used inside the project. 2015-01-23 11:01:09 -08:00
Marin Jankovski 103a1bb06d Use service settings instead of config file settings to present issues. 2015-01-23 10:28:38 -08:00
Ciro Santilli 40815b2baf Remove unused variable user at lib/gitlab/markdown 2014-10-23 13:12:21 +02:00
Marin Jankovski 2ea166fc33 Make sure relative url and asset_host are honored, specs. 2014-10-10 17:31:47 +02:00
Marin Jankovski b4828f4cf6 Enable markdown pipeline filters from inside gitlab. 2014-10-09 13:33:38 +02:00
Vinnie Okada 9f0083a96c Add task lists to issues and merge requests
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.
2014-10-05 22:15:27 -05:00
Vinnie Okada a9cd3bfaee Fix external commit links
Display the '@' character for links to commits in other projects.
2014-10-05 10:16:12 -05:00
Vinnie Okada bcf88c8559 Fix external issue links
Display the project path in links to issues in other projects that use
an external issue tracker.
2014-10-05 10:12:53 -05:00
Vinnie Okada 7edc1439fe Fix ReferenceExtractor
The cross-project reference feature broke the ReferenceExtractor class;
this fixes it.
2014-10-03 12:30:20 -05:00
Vinnie Okada 1b1ba6b0a5 Implement cross-project Markdown references
Enable linking to commits, merge requests, and issues in other projects
by prepending a namespaced project path to the reference.
2014-10-03 12:30:20 -05:00
Robert Schilling 390183a426 Factor out Emoji parsing using html-pipeline-gitlab 2014-09-26 01:32:33 +02:00
Marin Jankovski 3131d0609c Merge pull request #7147 from zzet/patch-12
Update markdown reference to external issues
2014-09-08 14:56:29 +02:00
Andrew Kumanyaev 11b707a62e fix link_to by @bwrsandman
Add missing '#'
2014-08-20 00:21:59 +04:00
Andrew Kumanyaev f789f29ca6 Update markdown.rb
Fix mistake by @qqshfox report
2014-08-18 11:22:11 +04:00
Andrew Kumanyaev 1e7598164b Update markdown reference to external issues
1. Issue may be not only in jira.
2. Rewrite method for support different external issue trackers
2014-06-23 19:28:03 +04:00
Marin Jankovski 4c575b72d5 Move checking of recepients to a service. 2014-06-23 15:44:49 +02:00
Marin Jankovski 63c1cdce42 Show @all in autocomplete list. 2014-06-23 11:54:58 +02:00
Andrew Kumanyaev 45f9d15c0e Fix mistake in reference_jira_issue method
Use local variable instead global
2014-06-18 11:11:09 +04:00
skvandGitLab 9c046fea67 links to issues on main dashboard 2014-05-26 13:24:21 +00:00
Marin JankovskiandDmitriy Zaporozhets 6b04a5f910 Add support for Jira ticket mentions in format JIRA-123.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	CHANGELOG-EE
2014-05-13 15:33:38 +03:00
Marin Jankovski 9dd58c320a Add to changelog. 2014-03-25 18:53:09 +01:00
Marin Jankovski 02850210b6 Allow referencing an existing user. 2014-03-25 18:53:09 +01:00
Marin Jankovski 5f595be4b8 Use new gems methods. 2014-03-20 13:33:16 +01:00
Daniel Lorch 686128cd68 JIRA project identifiers may also contain dashes '-' 2014-03-14 18:08:05 +01:00
Dmitriy Zaporozhets 6b206c9d96 Allow markdown tables 2013-08-26 14:27:19 +03:00
Dmitriy Zaporozhets 9acaec7a26 Searching for issue/mr by iid in markdown 2013-08-20 17:31:26 +03:00
Dmitriy Zaporozhets 49709b1d8a Fix broken user link in email 2013-08-04 16:27:32 +03:00
Dmitriy Zaporozhets 6577d3a49c Markdown now support users from groups 2013-06-22 00:06:21 +03:00
Pedro GuridiandPedro Guridi 5ec3129ea6 Changed regex to support Jira issue numbering format
Jira issues numbering format are like: "PROJECT-1234".
Changed the regular expression to support Jira issues linking, in addition to the normal #123.

Added Jira Issue tracker configuration example
2013-05-27 16:51:37 -03:00
Dmitriy Zaporozhets 31f007f79f Fix skipping of some elements in makrdown 2013-05-16 12:54:10 +03:00
Dmitriy Zaporozhets 0fccee82b7 Dont parse gfm-extractions as commit. Increase gfm rendering speed. Especially for a lot of code snippets 2013-05-16 12:15:42 +03:00
Dmitriy Zaporozhets 541d899410 Project.repository should never be nil so you can call repository.exists? or repository.empty?
Also specify separate project factory for project with filled repo
2013-04-01 16:56:25 +03:00
Martin Bastien 397c3da975 Fix user path in markdown 2013-03-19 21:29:59 -03:00
Andrew8xx8 9e8a818696 Issues helper included to markdown helper 2013-02-28 16:11:13 +04:00
Andrew8xx8 68a7ecdaaf Project issue tracker functions refactored 2013-02-28 16:10:00 +04:00
Andrew8xx8 e6d2e56961 Issue tracker field added to projects 2013-02-28 16:10:00 +04:00
Riyad Preukschas 2bc78739a7 Fix parsing of ref-like Urls in links and images in GFM
Fixes #2166
2013-01-16 22:39:56 +01:00
Riyad Preukschas 16b5417842 Use image Urls for Emoji in GFM
Fixes #2617
2013-01-16 22:39:45 +01:00
Riyad Preukschas 7635afd0c4 Use Urls for references in GFM 2013-01-16 22:08:01 +01:00