Skip to content

Commit

Permalink
support Underline element in Pandoc AST (solves #73) (#74)
Browse files Browse the repository at this point in the history
* support Underline element in Pandoc AST (solves #73)

* update NEWS

* build documents
  • Loading branch information
atusy authored Apr 18, 2022
1 parent 4c1a7d4 commit f3776a0
Show file tree
Hide file tree
Showing 27 changed files with 1,872 additions and 2,874 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ VignetteBuilder:
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
SystemRequirements: pandoc (>= 2.0.6) - http://pandoc.org
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ftExtra 0.3.0.9999

* `as_paragraph_md` supports empty string, `""`, as an input (#68).
* Improved support for the underline syntax in Pandoc's Markdown (#73).

# ftExtra 0.3.0

Expand Down
2 changes: 1 addition & 1 deletion R/as-paragraph-md.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ construct_chunk <- function(x, auto_color_link = "blue") {
width = image_size(x$Image, "width"),
height = image_size(x$Image, "height"),
vertical.align = vertical_align(x$Superscript, x$Subscript),
underlined = x$underlined %||% NA,
underlined = x$Underline %||% NA,
color = x$color %||% NA_character_,
shading.color = x$shading.color %||% NA_character_,
font.family = x$font.family %||% NA_character_
Expand Down
2 changes: 1 addition & 1 deletion R/md2df.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ format_by_attr <- function(x) {

if(length(a) == 0L) return(x)

x$underlined = any(a$class == "underline")
x$Underline = any(x$Underline, a$class == "underline")
x$color = last(a$color) %||% NA_character_
x$shading.color = last(a$shading.color) %||% NA_character_
x$font.family = last(a$font.family) %||% NA_character_
Expand Down
122 changes: 39 additions & 83 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f3776a0

Please sign in to comment.