Commit Graph
78 Commits
Author SHA1 Message Date
Darby 360ee25ddb Fixed the issues 2015-07-09 13:38:33 -07:00
Darby c611b6f623 Comment box/Placeholder text redo 2015-07-01 15:49:31 -07:00
Robert Speicher 09f2bec64c Prefix random Markdown tips with "Tip:" 2015-06-24 18:43:57 -04:00
Robert Speicher 82a671704d Show a random Markdown tip in the textarea placeholder 2015-06-23 21:00:10 -04:00
Robert Speicher 8112f7550b Add PreferencesHelper module
Consolidates the helpers related to user preferences.

Renames `app_theme` to `user_application_theme` to better explain what
it is.
2015-06-13 17:58:16 -04:00
Douwe Maan fe78984f20 Actually ignore references in code blocks etc. 2015-06-02 13:17:11 +02:00
Robert Speicher 5733bdb7c7 Fix link_to_gfm with only a reference having the incorrect link
Closes #1721
2015-05-29 04:46:14 -04:00
Robert Speicher 38fb6279f9 Simplify cross_project_reference with to_reference 2015-05-26 15:48:31 -04:00
Jakub Jirutka 8dbc4746fe Handle AsciiDoc better, reuse HTML pipeline filters (fixes #9263) 2015-05-18 20:48:03 +02:00
Douwe Maan cd52cef1c0 Fix reference links in dashboard activity and ATOM feeds. 2015-05-14 13:05:33 +02:00
Jakub Jirutka f7adac87fe Extract handling of relative file links to RelativeLinkFilter 2015-05-11 02:07:26 +02:00
Robert Speicher e46d1cdd8b Add Gitlab::Markdown::SanitizationFilter
This just extends the HTML::Pipeline::SanitizationFilter with our custom
whitelist.
2015-04-30 16:35:25 -04:00
Robert Speicher aa2cc670fe Add Gitlab::Markdown::AutolinkFilter 2015-04-30 16:35:25 -04:00
Robert Speicher 382a0aa6ef Add Gitlab::Markdown::TableOfContentsFilter
Removes header and table of contents processing from Redcarpet renderer.
2015-04-30 16:35:25 -04:00
Guillaume Delbergue 5f2e8b6147 Add footnotes support to Markdown
Signed-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>
2015-04-24 10:00:31 +02:00
Robert Speicher f76df89058 Begin cleaning out spec/helpers/gitlab_markdown_helper_spec 2015-04-20 13:01:44 -04:00
Douwe Maan 0ece6bd828 Use \A and \z in regexes instead of ^ and $. 2015-04-10 18:31:07 +02:00
Robert Speicher 13313d9e31 Disable RedCarpet's escape_html option
This option defaults to true in RedCarpet 3.2.0, but we handle
sanitization later in the process with html-pipeline.

Closes #2211
2015-04-09 17:28:45 -04:00
Dmitriy Zaporozhets 6199da0cb4 Merge pull request #8007 from mr-vinn/markdown-tags
Allow HTML tags in user Markdown input
2015-03-25 10:21:03 -07:00
Dmitriy Zaporozhets 69454e36f7 Style/RedundantReturn enabled 2015-03-24 18:35:57 -07:00
Dmitriy Zaporozhets 6ec8ff069c Enable more rubocop style checks 2015-03-24 18:28:10 -07:00
Vinnie Okada 52bf95ae38 Change HTML sanitization
Use the `SanitizationFilter` class from the html-pipeline gem for inline
HTML instead of calling the Rails `sanitize` method.
2015-03-19 21:24:07 -06:00
Vinnie Okada feeffc4426 Merge branch 'master' into markdown-tags
Use the latest HTML pipeline gem
2015-03-17 20:53:09 -06:00
Dmitriy Zaporozhets f29a7ce51f Merge branch 'markdown-smb-link' into 'master'
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
2015-03-12 03:57:52 +00:00
Stan Hu 4218a2bfcf Fix code preview theme setting for comments, issues, merge requests, and 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
2015-03-10 08:11:20 -07:00
Douwe Maan ca9aca9279 Allow smb:// links in Markdown text. 2015-03-10 13:32:28 +01:00
Douwe Maan 15bee7e0ff Fix Markdown relative links to files with anchors. 2015-02-18 12:32:20 +01:00
Dmitriy Zaporozhets ba51a1dd32 Render cross reference in issue title
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-03 11:15:00 +02:00
Vinnie Okada b3c70d001d Improve dashboard note view and add tests
Update the `#first_line_in_markdown` method so that the first line of
parsed text is displayed more reliably, and the continuation indicators
("...") are displayed in all cases where the note is truncated.

Also add Rspec tests for `EventsHelper#event_note`.
2014-10-12 23:56:56 -05:00
Vinnie Okada 5b2a42a091 Preserve link href in truncated note view
Notes on the dashboard views are truncated to 150 characters; this
change ensures that when a link's text is truncated it still points to
the correct URL.
2014-10-12 14:52:17 -05:00
Vinnie Okada 6798a6a8e2 Allow HTML tags in user Markdown input
Allow whitelisted tags to appear in rendered HTML output by disabling
Redcarpet's `:filter_html` option.
2014-10-10 14:42:24 -05:00
Dmitriy Zaporozhets 1e980ffbad Prevent 500 error on search results if description contains relative link 2014-09-23 17:56:41 +03:00
uran 02eca79ef1 Changed activity notes to display first MEANINGFUL line. 2014-09-12 14:22:15 +03:00
Dmitriy Zaporozhets e1f141ac1a gfm should respect @ref value when build relative links
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-06 12:14:53 +03:00
tbpgr e1535eff95 Fix gitlab_markdown_helper method header typo. rquest => request. 2014-07-10 21:59:01 +09:00
Dmitriy Zaporozhets 1e673c72a1 Improve markdown parsing
* dont try to build links for anchors like `#title-anchor`
* dont build relative url for project with empty repo

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 10:13:38 +03:00
Dmitriy Zaporozhets f881e43677 Merge pull request #7024 from skv-headless/linkto_issues_on_main_dashboard
links to issues on main dashboard
2014-06-11 15:02:48 +03:00
Marin Jankovski 603e04bc21 Make sure slashes are handled properly. 2014-05-26 20:43:58 +02:00
Marin Jankovski 52c3179be9 Do not replace links inside code blocks, less code for the same amount of work. 2014-05-26 20:43:58 +02:00
skvandGitLab 9c046fea67 links to issues on main dashboard 2014-05-26 13:24:21 +00:00
Marin Jankovski f04d5bfaf6 Wiki will show relative links related to the wiki gollum repository. 2014-03-17 13:06:19 +01:00
Marin Jankovski 55e2f353d4 Link to blob instead of linking to wiki. 2014-03-17 13:05:20 +01:00
Marin Jankovski f3ceebad42 Ignore newlines per md standard. 2014-03-14 12:33:03 +01:00
Ciro Santillli 90bdcac6b1 Blob and tree gfm links to anchors work.
Fixes #6046
2014-02-23 09:47:52 +01:00
Ciro Santillli 61748c993d Headers have ids and link to their own id. 2014-02-11 16:23:33 +01:00
Dmitriy Zaporozhets 31987259e4 Fix markdown renderer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-04 19:14:36 +02:00
Dmitriy Zaporozhets 97a4d8aea4 Improve code according to new gitlab_git
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-04 14:46:15 +02:00
Marin Jankovski 4f3876a2b6 Show images as raw and update the documentation. 2014-01-29 17:28:51 +01:00
Andrey Kumanyaev 53bdcb53ae Fix relative links in markdown. Related to #6182 2014-01-29 17:48:59 +04:00
Marin Jankovski 16ba8fa077 Display correct paths in markdown for reference style links. 2014-01-22 15:07:29 +01:00