Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
projects.thm.de
GitLab
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
Hide 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 Filter
#
# 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