to_md_vec()
takes an xml node or nodelist and returns a character vector of
the markdown produced.show_list()
, show_block()
, and show_censor()
will show the markdown
content of a node, nodelist, or list of nodes without needing to print the
entire document.yarn$show()
method now gains the lines
parameter, which allows you to
subset the output by the lines of text. A warning is produced if a stylesheet
is supplied in place of lines
.yarn$md_vec()
is a new method that will generate a character vector of
markdown elements from a query. This is a convenience method that uses
xml2::xml_find_all()
and to_md_vec()
in the background.get_protected()
function (and yarn method) will return nodes which have
been protected in some way by {tinkr} via one of the protect_
family of
functions. Adopting this pattern is preferred over using
md:text[@asis='true']
as the attribute names may change in the future
(@zkamvar, #111; reviewed: @maelle)<https://example.com/one>
) are no longer
transformed to markdown-style links (e.g.
[https://example.com/one](https://example.com/one)
). (issue: #59; fix: #115)$protect_math()
method
(issue: #121, #124 @maelle; fix: #122, #125 @zkamvar)protect_curly()
function will add a curly='true'
attribute to text
wrapped in curly braces ('{', '}') to allow parsing of the XML for sending to
external APIs. This function will also parse alt text and place it in an
attribute.$protect_curly()
method implements protect_curly()
on yarn objectsto_xml()
called unescaped = TRUE
, which indicates that you would like
unescaped square braces to remain unescaped (#78).First version on CRAN
stylesheets/
path, not extdata/
. If you
have not used tinkr::stylesheet()
to access the default stylesheet, you will
need to modify your code.tasklist
template for compatibility with commonmark
version 1.8 (#66)yarn
.to_xml()
+ to_md()
(@pdaengeli, #9)sourcepos
and encoding
options
when using the $reset()
method.protect_math()
function and method protects LaTeX math (dollar
notation) from escaping by commonmark (@zkamvar, #39).md_ns()
is a new convenience function to provide the md
namespace prefix for commonmark xml documents (@zkamvar, #39).stylesheet()
returns the path to the internal {tinkr} stylesheet
so that it can easily be discovered by other packagesshow()
, head()
, and tail()
all gain
stylesheet_path
arguments so the modified stylesheets can be used.[text][link-ref]
with `[link-ref]:
` on another place in the document will be preserved and the anchor will
sink to the bottom of the document.
transform_params()
is simplified and no longer requires glue.NEWS.md
file to track changes to the package.