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

Fixed malformed tables #978

Merged
merged 3 commits into from Feb 27, 2019
Merged

Fixed malformed tables #978

merged 3 commits into from Feb 27, 2019

Conversation

mitchelloharawild
Copy link
Contributor

@mitchelloharawild mitchelloharawild commented Feb 25, 2019

  • Tables with tailing TEXT (such as \n) now do not contain extra last rows
  • Empty separator detection is row robust to other separators (such as \code{})

Resolves #928

- Tables with tailing TEXT (such as \n) now do not contain extra last rows
- Empty separator detection is row robust to other separators (such as \code{})

Resolves #928
@jayhesselberth
Copy link
Collaborator

jayhesselberth commented Feb 25, 2019

Thanks! Could you please write a unit test for the changes? I think this needs to pass:

test_that("code blocks in tables render (#978)", {
  expect_equal(
    rd2html('\\tabular{ll}{a \\tab \\code{b} \\cr foo \\tab bar}')[[2]],
    "<tr><td>a</td><td><code>b</code></td></tr>"
  )
})

@jayhesselberth jayhesselberth merged commit 59cc923 into r-lib:master Feb 27, 2019
4 checks passed
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.

None yet

2 participants