Skip to content

Add more guidance to info field for search in Shiny app #141

@milanwiedemann

Description

@milanwiedemann

@HelenCEBM noticed that searching fails when entering special characters such as {, (, or [.
To "fix", escape these with a backslash (e.g. \(). Characters with special meaning (e.g., ? in regex must also be escaped to be searched literally.

Search for context, this needs no changing:

opencodecounts/R/server.R

Lines 201 to 204 in dcf2de2

if (!is.null(input$code_pattern_search) && input$code_pattern_search != "") {
data <- data |>
filter(grepl(paste("^", input$code_pattern_search, sep = ""), code, ignore.case = TRUE))
}

Add more guidance for users here:

"Enter search term(s). Multiple terms can be combined by using '|'.",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions