Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog post for pillar 1.2.1 #121

Merged
merged 5 commits into from
Mar 2, 2018
Merged

Blog post for pillar 1.2.1 #121

merged 5 commits into from
Mar 2, 2018

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Feb 26, 2018

@hadley: This requires a hotfix to be pushed to CRAN, to fix lubridate. I think the coloring of negative decimal numbers is wrong too.

Preview link: https://5a943d98efbe5d6bd34765fe--tidyverse-org.netlify.com/articles/2018/03/pillar-1-2-1/.

@hadley
Copy link
Member

hadley commented Feb 26, 2018

I think it might be easier for people to understand if you just use tibble(x) instead of pillar(x)

@krlmlr
Copy link
Member Author

krlmlr commented Feb 27, 2018

Thanks. Would you agree to an explanatory note? It seems that ansistrings can currently render pillar output but not tibble output (r-lib/ansistrings#14), and I'd rather avoid taking screenshots again.

@hadley
Copy link
Member

hadley commented Feb 27, 2018

Why is tibble not generated balanced escapes?

I'd really prefer to keep the blog post focussed on tibble, not on incidental details that most people won't care about.

@krlmlr
Copy link
Member Author

krlmlr commented Feb 27, 2018

tibble uses nested crayon styles which are implemented with escape codes. I might be able to work around this in tibble.

@krlmlr
Copy link
Member Author

krlmlr commented Feb 27, 2018

Changed examples to use tibble, added a clarification section to the bottom: https://deploy-preview-121--tidyverse-org.netlify.com/articles/2018/03/pillar-1-2-1/. Let's wait until Friday (the anticipated date of the blog post), binaries should be built by then.

@lionel-
Copy link
Member

lionel- commented Feb 27, 2018

FYI I needed this tweak to colourise_chunk():

colourise_chunk <- function(type) {
  function(x, options) {
    x <- pkgdown:::escape_html(x)
    x <- ansistrings::ansi_to_html(x, fullpage = FALSE)
    class <- tolower(options$engine)
    sprintf('<pre class="knitr %s">%s</pre>\n', class, x)
  }
}

It escapes HTML syntax which is necessary for printing stuff like <quosure>.

@krlmlr
Copy link
Member Author

krlmlr commented Feb 27, 2018

Thanks. I'm already using htmltools::htmlEscape(x) in the call to ansi_to_html(), the code looks very similar to yours.

@lionel-
Copy link
Member

lionel- commented Feb 27, 2018

oops sorry I must have been confused while debugging and somehow got rid of htmltools::htmlEscape()

@krlmlr krlmlr changed the title WIP: Blog post for pillar 1.2.1 Blog post for pillar 1.2.1 Mar 2, 2018
@krlmlr
Copy link
Member Author

krlmlr commented Mar 2, 2018

All binaries have been built on CRAN, ready to publish?

@hadley hadley merged commit 300c041 into tidyverse:master Mar 2, 2018
@hadley
Copy link
Member

hadley commented Mar 2, 2018

Published, thanks!

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

Successfully merging this pull request may close these issues.

3 participants