On 2 June 2015 at 11:25, Duncan Murdoch wrote: | On 02/06/2015 11:05 AM, Dirk Eddelbuettel wrote: | > Hi Kurt, | > | > On 1 June 2015 at 14:02, Kurt Hornik wrote: | > | >>>>> peter dalgaard writes: | > | | > | >> On 30 May 2015, at 01:20 , Imanuel Costigan <i.costigan at me.com> wrote: | > | >> | > | >> So I assume this commit means NEWS.md is now no longer on blacklist? | > | >> | > | | > | > ....in the development version. Not true of released versions. | > | | > | Now also in r-patched. | > | > Nice. | > | > Now, is there a way for package authors to preview how a .md would be | > rendered? I wrote mine with GitHub in mind, and they render fine. I looked a | > recently-uploaded README.md of mine on CRAN, and it got some of the pandoc-y | > parts wrong --- and looks unprofessional. | > | > I would like to avoid that. How can I? | | In the short term, you should probably try to run pandoc with the same | version and options as CRAN. Kurt, can you say what these are? If you | (Dirk) know pandoc options that emulate Github, it would probably make | sense for CRAN to use those. | | In the longer term, the plan is to include our own parser and renderer. | At that point this would be easy. Thumbs up -- the 'rmarkdown' package by JJ et al basically already does just this, and I have now authored a few (beamer) presentations that way. And quite like it. It is all fully scriptable -- and of course available interactive in whatever R shell you prefer -- and only requires pandoc besides what is on CRAN. Maybe medium-term Jeroen's commonmark can replace pandoc and then we'd fully based on CRAN packages. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
On 02/06/2015 11:42 AM, Dirk Eddelbuettel wrote:> On 2 June 2015 at 11:25, Duncan Murdoch wrote: > | On 02/06/2015 11:05 AM, Dirk Eddelbuettel wrote: > | > Hi Kurt, > | > > | > On 1 June 2015 at 14:02, Kurt Hornik wrote: > | > | >>>>> peter dalgaard writes: > | > | > | > | >> On 30 May 2015, at 01:20 , Imanuel Costigan <i.costigan at me.com> wrote: > | > | >> > | > | >> So I assume this commit means NEWS.md is now no longer on blacklist? > | > | >> > | > | > | > | > ....in the development version. Not true of released versions. > | > | > | > | Now also in r-patched. > | > > | > Nice. > | > > | > Now, is there a way for package authors to preview how a .md would be > | > rendered? I wrote mine with GitHub in mind, and they render fine. I looked a > | > recently-uploaded README.md of mine on CRAN, and it got some of the pandoc-y > | > parts wrong --- and looks unprofessional. > | > > | > I would like to avoid that. How can I? > | > | In the short term, you should probably try to run pandoc with the same > | version and options as CRAN. Kurt, can you say what these are? If you > | (Dirk) know pandoc options that emulate Github, it would probably make > | sense for CRAN to use those. > | > | In the longer term, the plan is to include our own parser and renderer. > | At that point this would be easy. > > Thumbs up -- the 'rmarkdown' package by JJ et al basically already does just > this, and I have now authored a few (beamer) presentations that way. And > quite like it. It is all fully scriptable -- and of course available > interactive in whatever R shell you prefer -- and only requires pandoc > besides what is on CRAN. Maybe medium-term Jeroen's commonmark can replace > pandoc and then we'd fully based on CRAN packages.Several of us have been talking about this, and have more or less decided against pandoc for the within-R version. It is too hard to build, or to include with R, on weird platforms. Something like commonmark is more likely. We'd also like to separate the parse and render steps. Duncan Murdoch
On Tue, Jun 2, 2015 at 8:42 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:> Several of us have been talking about this, and have more or less decided against pandoc for the within-R version. It is too hard to build, or to include with R, on weird platforms. Something like commonmark is more likely. We'd also like to separate the parse and render steps.The commonmark::markdown_xml function gives the parse tree in xml format. From there we could use something like xpath to query the content for individual news items and such. I think this is a more practical way of exposing the syntax tree than deeply nested lists or an external pointer to the internal C handle.