LOL!
turns out this functionality is already implemented.
there is a mod setting to configure how many space tabs a space gets replaced with
and this code is supposed to add that many spaces together to set up the tab replace.
this sequence should appear twice in Subs-Highlight.php
not sure why it's not working.
$tab = '';
if (!empty($modSettings['ch_tab'])) {
while ($i < $modSettings['ch_tab']) {
$tab .= ' ';
$i++;
}
}
// ...
$js = "\n\t\t" . '<script type="text/javascript" src="' . $settings['default_theme_url'] . '/highlight.pack.js"></script>
<script type="text/javascript">
hljs.configure({
tabReplace: "' . $tab . '",
useBR: true
});
hljs.initHighlightingOnLoad();
</script>';