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
Kazuhiko Shiozaki
gitlab-ce
Commits
c3865bda
Commit
c3865bda
authored
Jan 07, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly set task-list class on single item task lists
parent
09216e8b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
CHANGELOG
CHANGELOG
+1
-0
lib/banzai/filter/task_list_filter.rb
lib/banzai/filter/task_list_filter.rb
+9
-4
No files found.
CHANGELOG
View file @
c3865bda
...
...
@@ -21,6 +21,7 @@ v 8.4.0 (unreleased)
- Update version check images to use SVG
- Validate README format before displaying
- Enable Microsoft Azure OAuth2 support (Janis Meybohm)
- Properly set task-list class on single item task lists
v 8.3.3 (unreleased)
- Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running
...
...
lib/banzai/filter/task_list_filter.rb
View file @
c3865bda
...
...
@@ -12,13 +12,18 @@ module Banzai
#
# See https://github.com/github/task_list/pull/60
class
TaskListFilter
<
TaskList
::
Filter
def
add_css_class
(
node
,
*
new_class_names
)
def
add_css_class
_with_fix
(
node
,
*
new_class_names
)
if
new_class_names
.
include?
(
'task-list'
)
super
if
node
.
children
.
any?
{
|
c
|
c
[
'class'
]
==
'task-list-item'
}
else
super
# Don't add class to all lists
return
elsif
new_class_names
.
include?
(
'task-list-item'
)
add_css_class_without_fix
(
node
.
parent
,
'task-list'
)
end
add_css_class_without_fix
(
node
,
*
new_class_names
)
end
alias_method_chain
:add_css_class
,
:fix
end
end
end
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