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

Add Tickbox and Math Protection #39

Merged
merged 34 commits into from
May 11, 2021
Merged

Add Tickbox and Math Protection #39

merged 34 commits into from
May 11, 2021

Commits on May 1, 2021

  1. add asis node; demonstrate math protection

    This is definitely still a work in progress!
    zkamvar committed May 1, 2021
    Configuration menu
    Copy the full SHA
    28cd450 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2021

  1. fix example

    zkamvar committed May 2, 2021
    Configuration menu
    Copy the full SHA
    22f4464 View commit details
    Browse the repository at this point in the history
  2. add emph asis type

    commonmark wraps text in <emph></emph> tags. If I add `asis` to
    them, they disappear... which probably means that I just need to add
    the `asis` tag to the text nodes :face_palm:
    zkamvar committed May 2, 2021
    Configuration menu
    Copy the full SHA
    11d946b View commit details
    Browse the repository at this point in the history
  3. update asis node example

    zkamvar committed May 2, 2021
    Configuration menu
    Copy the full SHA
    acffb34 View commit details
    Browse the repository at this point in the history
  4. add asis node testing

    zkamvar committed May 2, 2021
    Configuration menu
    Copy the full SHA
    6ad6945 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. Configuration menu
    Copy the full SHA
    6c9af60 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Configuration menu
    Copy the full SHA
    e7846c0 View commit details
    Browse the repository at this point in the history
  2. make more progress towards inline math.

    It's now gibberish!
    zkamvar committed May 4, 2021
    Configuration menu
    Copy the full SHA
    365b861 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. use correct variable names

    This is why when you run into odd things during development, to
    restart and work with a clean environment, because sometimes you
    screw up.
    zkamvar committed May 5, 2021
    Configuration menu
    Copy the full SHA
    44e05fb View commit details
    Browse the repository at this point in the history
  2. add grouping for full regex

    zkamvar committed May 5, 2021
    Configuration menu
    Copy the full SHA
    55e16a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6d501a View commit details
    Browse the repository at this point in the history
  4. update documentation

    zkamvar committed May 5, 2021
    Configuration menu
    Copy the full SHA
    14655c5 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2021

  1. add include = TRUE for block math

    This allows us to include the delimiters for the search
    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    282c360 View commit details
    Browse the repository at this point in the history
  2. update regex for inline math

    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    fe955ee View commit details
    Browse the repository at this point in the history
  3. update inline math parsing

    Deer lord, I hope this makes sense six months down the line
    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    831c27f View commit details
    Browse the repository at this point in the history
  4. add new test with snapshot

    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    60d9a53 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72a69b1 View commit details
    Browse the repository at this point in the history
  6. export find_between(); fix parsing issue

    I had modified `find_between()` from pegboard:::find_between_tags()
    (https://github.com/carpentries/pegboard/blob/378c627b4e08869540aa049b678f9c4a560dff59/R/div.R#L125-L159)
    
    My initial modification to extract all of the descendants was in the
    context of block math where I knew that I just needed to add the 'asis'
    attribute to the nodes. In the context of inline math, where I needed to
    create new nodes, this was not feasible since extracting
    descendant-or-self would give me duplicate nodes, which would hinder the
    process of creating new nodes and lead to stuttering of the output.
    
    Separating out the search functionality into `find_between()` really
    helped me fix those two inconsistencies
    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    b6c91b4 View commit details
    Browse the repository at this point in the history
  7. update test

    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    b058508 View commit details
    Browse the repository at this point in the history
  8. add nocov tags

    zkamvar committed May 6, 2021
    Configuration menu
    Copy the full SHA
    14e0cee View commit details
    Browse the repository at this point in the history

Commits on May 7, 2021

  1. add tickbox protection

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    21d1688 View commit details
    Browse the repository at this point in the history
  2. document

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    c9f711d View commit details
    Browse the repository at this point in the history
  3. remove unneeded body

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    df7cf0d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    284bff0 View commit details
    Browse the repository at this point in the history
  5. Apply suggestions from code review

    Co-authored-by: Maëlle Salmon <maelle.salmon@yahoo.se>
    zkamvar and maelle authored May 7, 2021
    Configuration menu
    Copy the full SHA
    aae7811 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #40 from ropensci/small

    Add not math dollar in example
    zkamvar authored May 7, 2021
    Configuration menu
    Copy the full SHA
    589642c View commit details
    Browse the repository at this point in the history
  7. update error message

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    0701022 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    47e4d84 View commit details
    Browse the repository at this point in the history
  9. add test for error

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    d46e9ef View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c2748ed View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b9fd529 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5060438 View commit details
    Browse the repository at this point in the history
  13. process tickboxes up front

    zkamvar committed May 7, 2021
    Configuration menu
    Copy the full SHA
    c00a12a View commit details
    Browse the repository at this point in the history

Commits on May 11, 2021

  1. polish code; add docs; add tests

     - add xml_ns_strip() before node insertion events to avoid duplicate
       namespaces from accumulating (see
       https://community.rstudio.com/t/adding-nodes-in-xml2-how-to-avoid-duplicate-default-namespaces/84870)
     - export md_ns() and protect_math() for users of to_xml()
     - protect_tickbox() is now default in to_xml()
     - updated README
     - updated asis tests
    zkamvar committed May 11, 2021
    Configuration menu
    Copy the full SHA
    b3afe1e View commit details
    Browse the repository at this point in the history