Learn R Programming

markdown (version 1.2)

smartypants: smartypants: ASCII punctuation to HTML entities

Description

smartypants transforms plain ASCII punctuation characters into smart typographic punctuation HTML entities.

Usage

smartypants(file, output, text)

Value

smartypants returns NULL invisibly when output is to a file, and a character string otherwise.

Arguments

file

a character string giving the pathname of the file to read from. If it is omitted from the argument list, then it is presumed that the text argument will be used instead.

output

a character string giving the pathname of the file to write to. If it is omitted, then it is presumed that the user expects the results returned as a character string.

text

a character vector containing the markdown text to transform.

See Also

markdownExtensions, markdownHTMLOptions, markdownToHTML.

For a description of the original markdown version:

https://daringfireball.net/projects/markdown/

The original Sundown library on github:

https://github.com/vmg/sundown

C stubs for writing new renders are in inst/include/markdown_rstubs.[ch].

Examples

Run this code
cat(smartypants(text = "1/2 (c)\n"))

Run the code above in your browser using DataLab