help text should probably use cat(sep = "\n")
cnd:::cond_as_character_condition
#> cnd::condition_generator
#> cnd:as_character_cnd_error/error
#>
#> help
#> You cannot coerce a [cnd::condition_generator] object to a character. This may have occurred when trying to put a condition function through [stop()] or [warning]. Instead, call the function first, then pass the result to [stop()] or [warning()]. For example: ```r # Instead of this stop(my_condition) # Do this stop(my_condition()) ```
#>
#> exports
#> cnd::condition()
clean_text() should probably incorporate line returns:
do.call(cat, list( cnd:::grey(cnd:::clean_text("this\nthat")), sep = "\n"))
#> this
#> that
helpparameter should be able to take a functionprint()for help (below)helpin error? or link to execute code?clean_text()when class isAsIs(i.e.,I("my text")\n\n, unless wrapped in grave marksclean_padding()should ignore leading and trailing blank/space linestext[grepl("^[[:space:]]{0,}$", text)] <- ""$helpshould be produced when conditions are triggeredcnd()should probably contain awithCallingHandlers(), orglobalCallingHandlers('cnd::condition' = ...)on.onLoad()help text should probably use
cat(sep = "\n")clean_text()should probably incorporate line returns: