Skip to content

Commit

Permalink
Actually resolves facebook/react-native#824 however still waiting on …
Browse files Browse the repository at this point in the history
…RN team to pull upstream changes which fix the infinite loop
  • Loading branch information
lwansbrough committed Apr 12, 2015
1 parent f74c0e2 commit 4734049
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ var styles = {
},
tableRowCell: {
padding: 5
},
text: {
flex: 1
}
};

Expand Down
10 changes: 9 additions & 1 deletion rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ module.exports = function(styles) {
},
text: {
react: function(node, output) {
return React.createElement(Text, { style: styles.text }, node.content);
var words = node.content.split(' ');
words = _.map(words, function(word, i) {
var elements = [];
if (i != words.length - 1) {
word = word + ' ';
}
return React.createElement(Text, { style: styles.text }, word);
});
return words;
}
},
u: {
Expand Down

0 comments on commit 4734049

Please sign in to comment.