Note that this will always end in one newline \n.
Arguments
- x
Rd string. Backslashes must be double-escaped ("\\").
- fragment
logical indicating whether this represents a complete Rd file
- ...
additional arguments for as_markdown
Examples
rd_str_to_md("a\n%b\nc")
#> [1] "a\nc\n"
rd_str_to_md("a & b")
#> [1] "a & b\n"
rd_str_to_md("\\strong{\\emph{x}}")
#> [1] "****x****"
rd_str_to_md("\\enumerate{\\item test 1\n\n\\item test 2}")
#> [1] "1. test 1\n1. test 2\n\n"
rd_str_to_md("wrapped \\itemize{\\item test 1\n\\item test 2} in text")
#> [1] "wrapped * test 1\n* test 2\n\n in text\n"