@@ -2,11 +2,9 @@ import React, { Component, PropTypes } from "react";
22import { Text , View } from "react-native" ;
33
44import FitImage from "react-native-fit-image" ;
5- import getUniqueID from "./util/getUniqueID" ;
65import openUrl from "./util/openUrl" ;
76import hasParents from "./util/hasParents" ;
87import applyStyle from "./util/applyStyle" ;
9- import ImageComponent from "./ImageComponent" ;
108
119const renderRules = {
1210 // when unknown elements are introduced, so it wont break
@@ -53,10 +51,11 @@ const renderRules = {
5351 } ,
5452 // a
5553 link : ( node , children , parent , styles ) => {
54+ console . log ( node ) ;
5655 return (
5756 < Text
5857 key = { node . key }
59- style = { styles . a }
58+ style = { styles . link }
6059 onPress = { ( ) => openUrl ( node . attributes . href ) }
6160 >
6261 { children }
@@ -80,12 +79,7 @@ const renderRules = {
8079 } ,
8180
8281 heading2 : ( node , children , parent , styles ) => {
83-
8482 children = applyStyle ( children , [ styles . heading , styles . heading2 ] , "Text" ) ;
85-
86- console . log ( children ) ;
87-
88-
8983 return (
9084 < View key = { node . key } style = { styles . headingContainer } >
9185 { children }
@@ -235,10 +229,11 @@ const renderRules = {
235229 ) ,
236230 image : ( node , children , parent , styles ) => {
237231 return (
238- < ImageComponent
232+ < FitImage
233+ indicator = { true }
239234 key = { node . key }
240235 style = { styles . image }
241- uri = { node . attributes . src }
236+ source = { { uri : node . attributes . src } }
242237 />
243238 ) ;
244239 }
0 commit comments