Skip to content

Commit 83ccf03

Browse files
committed
Update functions to use new htmltools whitespace behavior
1 parent 5ad2a60 commit 83ccf03

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ install_requires =
3939
contextvars>=2.4
4040
websockets>=10.0
4141
python-multipart
42-
htmltools>=0.1.4.9001
42+
htmltools>=0.1.4.9002
4343
click>=8.0.3
4444
markdown-it-py>=1.1.0
4545
# This is needed for markdown-it-py. Without it, when loading shiny/ui/_markdown.py,

shiny/ui/_input_check_radio.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def input_checkbox(
7272
type="checkbox",
7373
checked="checked" if value else None,
7474
),
75+
" ",
7576
span(label),
7677
),
7778
class_="checkbox",
@@ -138,6 +139,7 @@ def _input_checkbox(
138139
type="checkbox",
139140
checked="checked" if value else None,
140141
),
142+
" ",
141143
tags.label(label, class_="form-check-label", for_=resolve_id(id)),
142144
class_=class_,
143145
),
@@ -333,9 +335,9 @@ def _generate_option(
333335
checked="checked" if checked else None,
334336
)
335337
if inline:
336-
return tags.label(input, span(label), class_=type + "-inline")
338+
return tags.label(input, " ", span(label), class_=type + "-inline")
337339
else:
338-
return div(tags.label(input, span(label)), class_=type)
340+
return div(tags.label(input, " ", span(label)), class_=type)
339341

340342

341343
def _normalize_choices(x: ChoicesArg) -> _Choices:

0 commit comments

Comments
 (0)