Skip to content

Commit

Permalink
need fix table
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Lozano Isla committed Jun 17, 2024
1 parent 06f02b5 commit 03e7070
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/gdoc2qmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ gdoc2qmd <- function(file
readLines() %>%
tibble::enframe() %>%
dplyr::filter(!grepl("^#+ $", .data$value)) %>%
dplyr::filter(!grepl("^#$", .data$value)) %>%
dplyr::mutate(value = gsub("```Unknown element type at this position: UNSUPPORTED```"
, "\n\n", .data$value)) %>%
{
Expand Down Expand Up @@ -82,9 +83,7 @@ gdoc2qmd <- function(file

fig <- txt %>%
dplyr::filter(grepl("#fig", .data$value)) %>%
tibble::as_tibble() %>%
dplyr::group_split(.data$value) %>%
rev() %>%
purrr::map_dfr(~ add_row(.x, .before = grepl("#fig", .x))) %>%
{
if(length(.) != 0) {
Expand Down

0 comments on commit 03e7070

Please sign in to comment.