Skip to content

Commit b7042b4

Browse files
committed
send love to @elenlefoll for the patience; close #11
1 parent 77502c8 commit b7042b4

File tree

4 files changed

+249
-165
lines changed

4 files changed

+249
-165
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: checkdown
22
Type: Package
33
Title: Check-Fields and Check-Boxes for 'rmarkdown'
4-
Version: 0.0.12
4+
Version: 0.0.13
55
Depends: R (>= 3.5.0)
66
Authors@R: c(person("George", "Moroz",
77
role = c("aut", "cre"),
@@ -18,5 +18,5 @@ BugReports: https://github.com/agricolamz/checkdown/issues
1818
Suggests: rmarkdown, knitr
1919
License: GPL (>= 2)
2020
Encoding: UTF-8
21-
RoxygenNote: 7.2.3
21+
RoxygenNote: 7.3.3
2222
VignetteBuilder: knitr

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
checkdown 0.0.13 (27.09.2025)
2+
- fix the issue with the alignment issue with longer answer options #11, thx to @elenlefoll
3+
14
checkdown 0.0.12 (27.10.2023)
25
- fast fix after the `insert_score()` problem (thanks to Ulyana Astafyeva and Dasha Gurevich for bringing it up)
36

R/check_question.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,22 @@ check_question <- function(answer,
123123

124124
UI_part <- lapply(seq_along(options), function(i){
125125
htmltools::tagList(
126-
htmltools::tags$input(type = type,
127-
name = glue::glue("answer_{q_id}"),
128-
id = glue::glue("answer_{q_id}_{i}"),
129-
value = ifelse(inherits(options[i], "list"), i, options[i])),
130-
htmltools::tags$label(options[i]),
126+
htmltools::tags$label(htmltools::tags$input(type = type,
127+
name = glue::glue("answer_{q_id}"),
128+
id = glue::glue("answer_{q_id}_{i}"),
129+
value = ifelse(inherits(options[i], "list"), i, options[i])),
130+
options[i]),
131131
if(alignment == "vertical"){htmltools::tags$br()})
132132
})
133133

134134
} else if(type == "checkbox" & !is.null(options)){
135135

136136
UI_part <- lapply(seq_along(options), function(i){
137137
htmltools::tagList(
138-
htmltools::tags$input(type = type,
139-
id = glue::glue("answer_{q_id}_{i}"),
140-
value = ifelse(inherits(options[i], "list"), i, options[i])),
141-
htmltools::tags$label(options[i]),
138+
htmltools::tags$label(htmltools::tags$input(type = type,
139+
id = glue::glue("answer_{q_id}_{i}"),
140+
value = ifelse(inherits(options[i], "list"), i, options[i])),
141+
options[i]),
142142
if(alignment == "vertical"){htmltools::tags$br()})
143143
})
144144
} else if(type == "in_order" & is.null(options)){

docs/index.html

Lines changed: 235 additions & 154 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)