<commit_before><?php
	$prevPageId = $pageid - 1;
	$nextPageId = $pageid + 1;
	$toalPages = ceil($count / $limit);
	$startid = $pageid - 5 > 1 ? $pageid - 5 : 1;
	$endid = $pageid + 4 < $toalPages ? $pageid + 4 : $toalPages;
?>

<div class="pagination">
	<ul>
		<?php if ($startid > 1): ?>
			<li><a href="javascript:;" pageid="1">First</a></li>
			<li><a>...</a></li>
		<?php endif ?>

		<?php for( $i = $startid; $i <= $endid; $i++ ): ?>
			<?php if ($i == $pageid): ?>
				<li class="active"><a><?php echo $i?></a></li>
			<?php else: ?>
				<li><a href="javascript:;" pageid="<?php echo $i?>"><?php echo $i?></a></li>
			<?php endif ?>
		<?php endfor ?>

		<?php if ($endid < $toalPages): ?>
			<li><a>...</a></li>
			<li><a href="javascript:;" pageid="$toalPages">Last</a></li>
		<?php endif ?>
	</ul>
</div><commit_msg>fix last page pagination<commit_after><?php
	$prevPageId = $pageid - 1;
	$nextPageId = $pageid + 1;
	$toalPages = ceil($count / $limit);
	$startid = $pageid - 5 > 1 ? $pageid - 5 : 1;
	$endid = $pageid + 4 < $toalPages ? $pageid + 4 : $toalPages;
?>

<div class="pagination">
	<ul>
		<?php if ($startid > 1): ?>
			<li><a href="javascript:;" pageid="1">First</a></li>
			<li><a>...</a></li>
		<?php endif ?>

		<?php for( $i = $startid; $i <= $endid; $i++ ): ?>
			<?php if ($i == $pageid): ?>
				<li class="active"><a><?php echo $i?></a></li>
			<?php else: ?>
				<li><a href="javascript:;" pageid="<?php echo $i?>"><?php echo $i?></a></li>
			<?php endif ?>
		<?php endfor ?>

		<?php if ($endid < $toalPages): ?>
			<li><a>...</a></li>
			<li><a href="javascript:;" pageid="<?php echo $toalPages?>">Last</a></li>
		<?php endif ?>
	</ul>
</div>
{'fraction_non_alphanumeric': 0.28827751196172247, 'fraction_numerical': 0.011961722488038277, 'mean_word_length': 3.449468085106383, 'pattern_counts': {'":': 0, '<': 92, '<?xml version=': 0, '>': 90, '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': '7214209', 'n_tokens_mistral': 772, 'n_tokens_neox': 702, 'n_words': 158}