Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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.

Value

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

See Also

For a description of the original markdown version:

The original Sundown library on github:

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

Examples

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

markdown

Render Markdown with the C Library 'Sundown'

v1.1
GPL-2
Authors
JJ Allaire [aut], Jeffrey Horner [aut], Yihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>), Henrik Bengtsson [ctb], Jim Hester [ctb], Yixuan Qiu [ctb], Kohske Takahashi [ctb], Adam November [ctb], Nacho Caballero [ctb], Jeroen Ooms [ctb], Thomas Leeper [ctb], Joe Cheng [ctb], Andrzej Oles [ctb], Vicent Marti [aut, cph] (The Sundown library), Natacha Porte [aut, cph] (The Sundown library), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.