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

Better error messages for tag parsing failures #771

Closed
wants to merge 4 commits into from

Commits on Jul 24, 2018

  1. fix typo

    BarkleyBG committed Jul 24, 2018
    Configuration menu
    Copy the full SHA
    ed6b86a View commit details
    Browse the repository at this point in the history
  2. More verbose error handling in as_html()

    Fixes r-lib#770
    
    I tried to make the error messages extremely verbose by passing in information about the file name and section tag from where the error originated. This may be a little fragile, but it didn't break any existing tests.
    
    - Added unit test for as_html.tag_url
    - Made errors more verbose by changing stopifnot() to if-then with a descriptive stop message in multiple cases (e.g., as_html.tag_url, as_html.tag_eqn, etc)
    - Also trying to pass in information on the Section and File from which the error was thrown.
    BarkleyBG committed Jul 24, 2018
    Configuration menu
    Copy the full SHA
    204fd2b View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2018

  1. omit section_name logging

    passes all tests in  testthat::test_file("tests/testthat/test-rd-html.R")
    BarkleyBG committed Nov 11, 2018
    Configuration menu
    Copy the full SHA
    f55f7d1 View commit details
    Browse the repository at this point in the history
  2. create stop_on_bad_html_tag() fun

    - Combines similar code into one function
    - Passes all 67 tests in testthat::test_file("tests/testthat/test-rd-html.R")
      - Note that the test uses a call to rlang::bind_env(), which helped me to make sure the function worked as desired. This may however have some side effects that I dont know about.
    BarkleyBG committed Nov 11, 2018
    Configuration menu
    Copy the full SHA
    5d415cb View commit details
    Browse the repository at this point in the history