Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: remarkablemark/html-react-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.3
Choose a base ref
...
head repository: remarkablemark/html-react-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.4
Choose a head ref
  • 16 commits
  • 10 files changed
  • 2 contributors

Commits on Aug 25, 2016

  1. Configuration menu
    Copy the full SHA
    886e1d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2a9655 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d2cb9f1 View commit details
    Browse the repository at this point in the history
  4. Ignore coverage directory

    Add directory to:
    - .gitignore
    - .npmignore
    remarkablemark committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    e44e739 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #12 from remarkablemark/coveralls

    Setup Istanbul and Coveralls for coverage reporting
    remarkablemark authored Aug 25, 2016
    Configuration menu
    Copy the full SHA
    dadbac7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    194b5f6 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #13 from remarkablemark/badges

    Update README with Travis and Coveralls badges
    remarkablemark authored Aug 25, 2016
    Configuration menu
    Copy the full SHA
    23bd928 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2016

  1. Configuration menu
    Copy the full SHA
    91f5340 View commit details
    Browse the repository at this point in the history
  2. Add badges from NodeICO, NPM, and David to README

    Display npm package details:
    - https://nodei.co
    
    Display npm version:
    - http://shields.io
    
    Display npm dependencies status:
    - https://david-dm.org
    
    Misc: https://yanni4night.github.io/badge.html
    remarkablemark committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    6cd5ea6 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #15 from remarkablemark/readme

    Fix typo and add more badges to README
    remarkablemark authored Aug 26, 2016
    Configuration menu
    Copy the full SHA
    15d92ab View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2016

  1. Make sure props.children is null for void elements like <img>

    The error came from the fact that `props.children` would always
    be at minimum an empty array `[]`.
    
    This causes the following error:
    ```js
    ReactDOMServer.renderToString(
        Parser('<img />')
    );
    // Invariant Violation: img is a void element tag and must neither
    // have `children` nor use `dangerouslySetInnerHTML`.
    ```
    
    The fix was to make `props.children` equal to `null` unless
    there were actually more DOM nodes inside the array.
    
    Add tests to confirm that void HTML element tags no longer throws
    an error.
    remarkablemark committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    2a12730 View commit details
    Browse the repository at this point in the history
  2. Refactor tests by moving render function into helpers

    `render` is an alias for `ReactDOMServer.renderToStaticMarkup`
    
    Update `render` function to check that the first argument is a
    valid React element; otherwise, throw an error.
    remarkablemark committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    db39cf6 View commit details
    Browse the repository at this point in the history
  3. Update replace method with additional key parameter

    The `replace` method now has 2 parameters:
    1. domNode - The object describing the DOM node.
    2. key     - The array index.
    
    The `key` parameter was added because if the element had siblings,
    then the replaced React element should have a unique "key" prop
    or else React will display a warning:
    
    > Warning: Each child in an array or iterator should have a
    > unique "key" prop. See https://fb.me/react-warning-keys for
    > more information.
    
    Updated the mock data for complex html and used the `key` parameter
    to fix a test.
    remarkablemark committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    226cc15 View commit details
    Browse the repository at this point in the history
  4. Update README with better documentation on replace method

    Add new parameter `key` and update examples.
    remarkablemark committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    e3c91ac View commit details
    Browse the repository at this point in the history
  5. Merge pull request #16 from remarkablemark/bug-void-element

    Fix void element bug and add `key` parameter to `replace` method
    remarkablemark authored Aug 29, 2016
    Configuration menu
    Copy the full SHA
    20177ee View commit details
    Browse the repository at this point in the history
  6. Bump version to 0.0.4

    - Fix void element bug (#14)
      - Void elements like <img> should not have any children
        (even an empty array `[]` counts as children)
    - Pass `key` to the `replace` method as the second parameter
      - Prevent React "key" warning
    - Update tests, mocks, and helpers
    - Update README with update on `replace` method
    remarkablemark committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    ddd289b View commit details
    Browse the repository at this point in the history
Loading