Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
8e7111f7
Commit
8e7111f7
authored
Aug 27, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reference filters no longer take a custom class context option
parent
a4e4fde3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1 addition
and
43 deletions
+1
-43
lib/gitlab/markdown.rb
lib/gitlab/markdown.rb
+0
-1
lib/gitlab/markdown/reference_filter.rb
lib/gitlab/markdown/reference_filter.rb
+1
-2
spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb
...lib/gitlab/markdown/commit_range_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb
...b/gitlab/markdown/external_issue_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb
...ib/gitlab/markdown/merge_request_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
+0
-5
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
+0
-5
No files found.
lib/gitlab/markdown.rb
View file @
8e7111f7
...
...
@@ -67,7 +67,6 @@ module Gitlab
# options - A Hash of options used to customize output (default: {}):
# :xhtml - output XHTML instead of HTML
# :reference_only_path - Use relative path for reference links
# html_options - extra options for the reference links as given to link_to
def
self
.
gfm
(
text
,
options
=
{})
return
text
if
text
.
nil?
...
...
lib/gitlab/markdown/reference_filter.rb
View file @
8e7111f7
...
...
@@ -9,7 +9,6 @@ module Gitlab
#
# Context options:
# :project (required) - Current project, ignored if reference is cross-project.
# :reference_class - Custom CSS class added to reference links.
# :only_path - Generate path-only links.
#
# Results:
...
...
@@ -70,7 +69,7 @@ module Gitlab
end
def
reference_class
(
type
)
"gfm gfm-
#{
type
}
#{
context
[
:reference_class
]
}
"
.
strip
"gfm gfm-
#{
type
}
"
.
strip
end
# Iterate through the document's text nodes, yielding the current node's
...
...
spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -75,11 +75,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-commit_range'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"See
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"See
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -71,11 +71,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-commit'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"See
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"See
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -68,11 +68,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-issue'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Issue
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'supports an :only_path context'
do
doc
=
filter
(
"Issue
#{
reference
}
"
,
only_path:
true
)
link
=
doc
.
css
(
'a'
).
first
.
attr
(
'href'
)
...
...
spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -68,11 +68,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-issue'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Issue
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"Issue
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -25,11 +25,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-label'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Label
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"Label
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -56,11 +56,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-merge_request'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Merge
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"Merge
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -55,11 +55,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-snippet'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Snippet
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'includes a data-project-id attribute'
do
doc
=
filter
(
"Snippet
#{
reference
}
"
)
link
=
doc
.
css
(
'a'
).
first
...
...
spec/lib/gitlab/markdown/user_reference_filter_spec.rb
View file @
8e7111f7
...
...
@@ -130,11 +130,6 @@ module Gitlab::Markdown
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
eq
'gfm gfm-project_member'
end
it
'includes an optional custom class'
do
doc
=
filter
(
"Hey
#{
reference
}
"
,
reference_class:
'custom'
)
expect
(
doc
.
css
(
'a'
).
first
.
attr
(
'class'
)).
to
include
'custom'
end
it
'supports an :only_path context'
do
doc
=
filter
(
"Hey
#{
reference
}
"
,
only_path:
true
)
link
=
doc
.
css
(
'a'
).
first
.
attr
(
'href'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment