<commit_before>import React, { PropTypes } from 'react';

const PoemLine = ({ line }) => (
  <div className="poemLine">
    {line}
  </div>
);

PoemLine.propTypes = {
  line: PropTypes.string,
};

const Poem = ({ poem }) => {
  const poemLineNodes = poem.text.split(/\n/).map((line, index) => (
    <PoemLine line={line} key={index} />
  ));
  return (
    <div className="poem">
      <h2 className="poemTitle">
        {poem.title}
      </h2>
      <p><em>by</em> {poem.author}</p>
      <div className="poemText">
        {poemLineNodes}
      </div>
    </div>
  );
};

Poem.propTypes = {
  poem: PropTypes.shape({
    title: PropTypes.string.isRequired,
    author: PropTypes.string.isRequired,
    text: PropTypes.string.isRequired,
  }),
};

export default Poem;
<commit_msg>Render blank lines of poems<commit_after>import React, { PropTypes } from 'react';

const PoemLine = ({ line }) => (
  <div className="poemLine">
    {line}
  </div>
);

PoemLine.propTypes = {
  line: PropTypes.string,
};

const Poem = ({ poem }) => {
  const poemLineNodes = poem.text.split(/\n/).map((line, index) => {
    const NBSP = '\u00A0'; // Unicode value for non-breaking space
    return <PoemLine line={(line.trim().length === 0) ? NBSP : line} key={index} />;
  });
  return (
    <div className="poem">
      <h2 className="poemTitle">
        {poem.title}
      </h2>
      <p><em>by</em> {poem.author}</p>
      <div className="poemText">
        {poemLineNodes}
      </div>
    </div>
  );
};

Poem.propTypes = {
  poem: PropTypes.shape({
    title: PropTypes.string.isRequired,
    author: PropTypes.string.isRequired,
    text: PropTypes.string.isRequired,
  }),
};

export default Poem;

{'fraction_non_alphanumeric': 0.18332347723240686, 'fraction_numerical': 0.004730928444707274, 'mean_word_length': 2.8986175115207375, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2086377', 'n_tokens_mistral': 603, 'n_tokens_neox': 611, 'n_words': 118}