smartypants function

Convert some ASCII strings to HTML entities

Convert some ASCII strings to HTML entities

Transform ASCII strings (c) (copyright), (r) (registered trademark), (tm) (trademark), and fractions n/m into smart typographic HTML entities.

smartypants(text)

Arguments

  • text: A character vector of the Markdown text.

Returns

A character vector of the transformed text.

Examples

cat(smartypants("1/2 (c)\n"))
  • Maintainer: Yihui Xie
  • License: MIT + file LICENSE
  • Last published: 2025-03-23