<commit_before>import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import LocalClient from '../../stores/local-client.stores.jsx';
import Lifespan from 'lifespan';
import classNames from 'classnames';

/**
*	Component : the handlegrip (green bar) surrounding the letter
*	@extends React.Component
*/
export default class HandlegripBar extends React.Component {
	constructor(props) {
		super(props);
		this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);

		// function bindings
		this.handleDown = this.handleDown.bind(this);
	}

	componentWillMount() {
		this.client = LocalClient.instance();
		this.lifespan = new Lifespan();
	}

	componentWillUnmount() {
		this.lifespan.release();
	}

	handleDown(e) {
		// tells everyone that the tracking begins, and on which side
		this.client.dispatchAction('/store-value', {uiSpacingTracking: this.props.side});

		const newX = e.pageX || e.screenX;

		this.client.dispatchAction('/store-value-fast', {uiTrackingX: newX, clampedValue: this.props.spacing - this.props.baseSpacing});

		e.stopPropagation();
	}

	render() {
		const left = this.props.side === 'left';
		const handleGripClasses = classNames({
			'handlegrip': true,
			'handlegrip-left': left,
			'handlegrip-right': !left,
		});

		const text = (this.props.clampedValue ? this.props.clampedValue + this.props.baseSpacing : this.props.spacing) || '...';

		return (
			<span
				className={handleGripClasses}
				onMouseDown={this.handleDown}
				style={this.props.style}
			>
				<span className="handlegrip-border"></span>
				<span className="handlegrip-spacing-number">
					{text.toFixed()}
				</span>
			</span>
		);
	}
}
<commit_msg>fix spacing for 0 basespacing glyphs<commit_after>import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import LocalClient from '../../stores/local-client.stores.jsx';
import Lifespan from 'lifespan';
import classNames from 'classnames';

/**
*	Component : the handlegrip (green bar) surrounding the letter
*	@extends React.Component
*/
export default class HandlegripBar extends React.Component {
	constructor(props) {
		super(props);
		this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);

		// function bindings
		this.handleDown = this.handleDown.bind(this);
	}

	componentWillMount() {
		this.client = LocalClient.instance();
		this.lifespan = new Lifespan();
	}

	componentWillUnmount() {
		this.lifespan.release();
	}

	handleDown(e) {
		// tells everyone that the tracking begins, and on which side
		this.client.dispatchAction('/store-value', {uiSpacingTracking: this.props.side});

		const newX = e.pageX || e.screenX;

		this.client.dispatchAction('/store-value-fast', {uiTrackingX: newX, clampedValue: this.props.spacing - this.props.baseSpacing});

		e.stopPropagation();
	}

	render() {
		const left = this.props.side === 'left';
		const handleGripClasses = classNames({
			'handlegrip': true,
			'handlegrip-left': left,
			'handlegrip-right': !left,
		});

		const text = (this.props.clampedValue ? this.props.clampedValue + this.props.baseSpacing : this.props.spacing) || '...';

		return (
			<span
				className={handleGripClasses}
				onMouseDown={this.handleDown}
				style={this.props.style}
			>
				<span className="handlegrip-border"></span>
				<span className="handlegrip-spacing-number">
					{text instanceof Number ? text.toFixed() : text}
				</span>
			</span>
		);
	}
}

{'fraction_non_alphanumeric': 0.14281600921393608, 'fraction_numerical': 0.00028793550244745177, 'mean_word_length': 4.1850746268656716, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6345076', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1114, 'n_words': 227}