react-markdown
Advanced tools
Comparing version 3.3.4 to 3.4.0
@@ -5,2 +5,14 @@ # Change Log | ||
## 3.4.0 - 2018-07-25 | ||
### Added | ||
* Add more metadata props to list and listItem (André Staltz) | ||
- list: `depth` | ||
- listItem: `ordered`, `index` | ||
### Fixes | ||
* Make `source` property optional in typescript definition (gRoberts84) | ||
## 3.3.4 - 2018-06-19 | ||
@@ -7,0 +19,0 @@ |
// Type definitions for react-markdown > v3.3.0 | ||
// Project: https://github.com/rexxars/react-markdown | ||
// Definitions by: Ruslan Ibragimov <https://github.com/IRus>, Kohei Asai <me@axross.io>, ClassicDarkChocolate<https://github.com/ClassicDarkChocolate> | ||
// Definitions by: | ||
// - Ruslan Ibragimov <https://github.com/IRus> | ||
// - Kohei Asai <me@axross.io> | ||
// - ClassicDarkChocolate <https://github.com/ClassicDarkChocolate> | ||
// - Espen Hovlandsdal <https://espen.codes/> | ||
@@ -63,3 +67,3 @@ import {Component, ReactElement, ReactNode, ReactType} from 'react' | ||
readonly className?: string | ||
readonly source: string | ||
readonly source?: string | ||
readonly sourcePos?: boolean | ||
@@ -95,2 +99,3 @@ readonly rawSourcePos?: boolean | ||
data?: {[key: string]: any} | ||
index?: number | ||
depth?: number | ||
@@ -97,0 +102,0 @@ height?: number |
@@ -66,2 +66,3 @@ 'use strict'; | ||
props.tight = !node.loose; | ||
props.depth = node.depth; | ||
break; | ||
@@ -71,2 +72,4 @@ case 'listItem': | ||
props.tight = !node.loose; | ||
props.ordered = node.ordered; | ||
props.index = node.index; | ||
props.children = (props.tight ? unwrapParagraphs(node) : node.children).map(function (childNode, i) { | ||
@@ -73,0 +76,0 @@ return astToReact(childNode, opts, { node: node, props: props }, i); |
@@ -9,2 +9,3 @@ 'use strict'; | ||
var PropTypes = require('prop-types'); | ||
var addListMetadata = require('mdast-add-list-metadata'); | ||
var naiveHtml = require('./plugins/naive-html'); | ||
@@ -51,3 +52,3 @@ var disallowNode = require('./plugins/disallow-node'); | ||
function determineAstPlugins(props) { | ||
var plugins = [wrapTableRows]; | ||
var plugins = [wrapTableRows, addListMetadata()]; | ||
@@ -54,0 +55,0 @@ var disallowedTypes = props.disallowedTypes; |
{ | ||
"name": "react-markdown", | ||
"description": "Renders Markdown as React components", | ||
"version": "3.3.4", | ||
"version": "3.4.0", | ||
"keywords": [ | ||
@@ -37,2 +37,3 @@ "markdown", | ||
"dependencies": { | ||
"mdast-add-list-metadata": "^1.0.0", | ||
"prop-types": "^15.6.1", | ||
@@ -39,0 +40,0 @@ "remark-parse": "^5.0.0", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
384787
7
606
+ Added@types/unist@2.0.11(transitive)
+ Addedmdast-add-list-metadata@1.1.0(transitive)
+ Addedunist-util-is@4.1.0(transitive)
+ Addedunist-util-visit-parents@3.1.1(transitive)