<commit_before>import React, { Component, PropTypes } from 'react'
import { renderToString } from 'react-dom/server'

export default class Html extends Component {
  static propTypes = {
    assets: PropTypes.object,
    component: PropTypes.node,
    store: PropTypes.object
  }

  get scripts() {
    const { javascript } = this.props.assets

    return Object.keys(javascript).map((script, i) =>
      <script src={javascript[script]} key={i} />
    )
  }

  get styles() {
    const { assets } = this.props
    const { styles, assets: _assets } = assets
    const stylesArray = Object.keys(styles)

    // styles (will be present only in production with webpack extract text plugin)
    if (stylesArray.length !== 0) {
      return stylesArray.map((style, i) =>
        <link href={assets.styles[style]} key={i} rel="stylesheet" type="text/css" />
      )
    }

    // (will be present only in development mode)
    // It's not mandatory but recommended to speed up loading of styles
    // (resolves the initial style flash (flicker) on page load in development mode)
    const scssPaths = Object.keys(_assets).filter(asset => asset.includes('.css'))
    return scssPaths.map((style, i) =>
      <style dangerouslySetInnerHTML={{ __html: _assets[style]._style }} key={i} />
    )
  }

  render() {
    const { component, store } = this.props

    return (
      <html>
        <head>
          <meta charSet="utf-8" />

          <meta name="viewport" content="width=device-width, initial-scale=1" />
          <meta name="apple-mobile-web-app-capable" content="yes" />
          <meta name="apple-mobile-web-app-status-bar-style" content="black" />
          <title>React Redux Universal Boilerplate</title>
          <link rel="shortcut icon" href="/favicon.ico" />
          {this.styles}
        </head>

        <body>
          <div id="root" dangerouslySetInnerHTML={{ __html: renderToString(component) }} />
          <script dangerouslySetInnerHTML={{ __html: `window.__INITIAL_STATE__=${JSON.stringify(store.getState())};` }} />
          {this.scripts}
        </body>
      </html>
    )
  }
}
<commit_msg>style(Html): fix style error<commit_after>import React, { Component, PropTypes } from 'react'
import { renderToString } from 'react-dom/server'

export default class Html extends Component {
  static propTypes = {
    assets: PropTypes.object,
    component: PropTypes.node,
    store: PropTypes.object
  }

  get scripts() {
    const { javascript } = this.props.assets

    return Object.keys(javascript).map((script, i) =>
      <script src={javascript[script]} key={i} />
    )
  }

  get styles() {
    const { assets } = this.props
    const { styles, assets: _assets } = assets
    const stylesArray = Object.keys(styles)

    // styles (will be present only in production with webpack extract text plugin)
    if (stylesArray.length !== 0) {
      return stylesArray.map((style, i) =>
        <link href={assets.styles[style]} key={i} rel="stylesheet" type="text/css" />
      )
    }

    // (will be present only in development mode)
    // It's not mandatory but recommended to speed up loading of styles
    // (resolves the initial style flash (flicker) on page load in development mode)
    const scssPaths = Object.keys(_assets).filter(asset => asset.includes('.css'))
    return scssPaths.map((style, i) =>
      <style dangerouslySetInnerHTML={{ __html: _assets[style]._style }} key={i} />
    )
  }

  render() {
    const { component, store } = this.props

    return (
      <html lang="en">
        <head>
          <meta charSet="utf-8" />

          <meta name="viewport" content="width=device-width, initial-scale=1" />
          <meta name="apple-mobile-web-app-capable" content="yes" />
          <meta name="apple-mobile-web-app-status-bar-style" content="black" />
          <title>React Redux Universal Boilerplate</title>
          <link rel="shortcut icon" href="/favicon.ico" />
          {this.styles}
        </head>

        <body>
          <div id="root" dangerouslySetInnerHTML={{ __html: renderToString(component) }} />
          <script dangerouslySetInnerHTML={{ __html: `window.__INITIAL_STATE__=${JSON.stringify(store.getState())};` }} />
          {this.scripts}
        </body>
      </html>
    )
  }
}

{'fraction_non_alphanumeric': 0.1418207348467119, 'fraction_numerical': 0.001404165691551603, 'mean_word_length': 2.7722859664607236, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 47, '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': '232476', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1259, 'n_words': 316}