@@ -54,7 +54,7 @@ const reactAttributesMap: { [keyof: string]: string } = {
5454 usemap : 'useMap' ,
5555}
5656
57- function transformAttributes ( attributesMap : NamedNodeMap , options : Config ) : Attributes {
57+ function transformAttributes ( attributesMap : NamedNodeMap ) : Attributes {
5858 const attributes = getAttributes ( attributesMap )
5959 const transformedAttributes : Attributes = { }
6060 Object . keys ( attributes ) . forEach ( ( key ) => {
@@ -64,9 +64,6 @@ function transformAttributes(attributesMap: NamedNodeMap, options: Config): Attr
6464 transformedAttributes [ key ] = attributes [ key ]
6565 }
6666 } )
67- if ( options . generatesKeys ) {
68- transformedAttributes . key = attributes . key || attributes . id || Math . random ( ) . toString ( 36 ) . substr ( 2 , 5 )
69- }
7067 return transformedAttributes
7168}
7269
@@ -75,7 +72,7 @@ function renderTextNode(node: Node & ChildNode) {
7572}
7673
7774function renderElementNode ( node : Node & ChildNode , options : Config ) {
78- const element = transform ( node as EnrichedElement , options )
75+ const element = transform ( node as EnrichedElement )
7976
8077 if ( element . override ) {
8178 return React . cloneElement ( element . override ( element . attributes , node . textContent ) )
@@ -87,9 +84,9 @@ function renderElementNode(node: Node & ChildNode, options: Config) {
8784 return React . createElement ( element . nodeName , element . attributes )
8885}
8986
90- function transform ( element : EnrichedElement , options : Config ) {
87+ function transform ( element : EnrichedElement ) {
9188 return {
92- attributes : transformAttributes ( element . attributes , options ) ,
89+ attributes : transformAttributes ( element . attributes ) ,
9390 childNodes : element . childNodes ,
9491 nodeName : element . nodeName . toLowerCase ( ) ,
9592 nodeType : element . nodeType ,
0 commit comments