Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

Title illegitimately detected in markdown content #46

Closed
stla opened this issue Nov 24, 2014 · 3 comments
Closed

Title illegitimately detected in markdown content #46

stla opened this issue Nov 24, 2014 · 3 comments
Labels

Comments

@stla
Copy link

stla commented Nov 24, 2014

Hello,
It seems that ReporteRs considers there's a title in the character string "- aa\n- bb" when I add it with addMarkdown. It generates the folowing warning:

Warning message:
In addMarkdown.pptx(doc, text = mkd, default.par.properties = parProperties(text.align = "justify",  :
  titles are not supported with pptx object

Below is a reproducible example. As you can see, there's no problem in the first slide with "- aa\n- bb\n- cc".

library(ReporteRs)

pptx.file = "ztest.pptx"  
options( "ReporteRs-fontsize" = 26 )

doc = pptx( title = "title")
ordered.list.level1 = parProperties(list.style = 'unordered', level = 1 )

# slide 1
doc = addSlide( doc, slide.layout = "Two Content" )
doc = addTitle( doc, "Hello 1" )
mkd <- "- aa\n- bb\n- cc"
doc = addMarkdown( doc, text = mkd, 
                   default.par.properties = parProperties(text.align = "justify", 
                                                          padding.left = 0) )
# slide 2
doc = addSlide( doc, slide.layout = "Two Content" )
doc = addTitle( doc, "Hello 2" )
mkd <- "- aa\n- bb"
doc = addMarkdown( doc, text = mkd, 
                   default.par.properties = parProperties(text.align = "justify", 
                                                          padding.left = 0) )

writeDoc( doc, pptx.file )
@davidgohel davidgohel added the bug label Nov 24, 2014
@davidgohel
Copy link
Owner

Thanks, I can reproduce it.

Yes, there is an issue. Note it works if replacing '-' by '*'.
I will correct that in the next version.

David

@stla
Copy link
Author

stla commented Nov 24, 2014

Thank you. Otherwise \n\n instead of \n works fine.

davidgohel added a commit that referenced this issue Nov 25, 2014
@davidgohel
Copy link
Owner

The issue should be solved (a bad regexpr...)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants