MCPcopy Create free account
hub / github.com/unconed/TermKit / processTabs

Function processTabs

HTML/external/syntaxhighlighter_3.0.83/src/shCore.js:850–858  ·  view source on GitHub ↗

* Replaces tabs with spaces. * * @param {String} code Source code. * @param {Number} tabSize Size of the tab. * @return {String} Returns code with all tabs replaces by spaces.

(code, tabSize)

Source from the content-addressed store, hash-verified

848 * @return {String} Returns code with all tabs replaces by spaces.
849 */
850function processTabs(code, tabSize)
851{
852 var tab = '';
853
854 for (var i = 0; i < tabSize; i++)
855 tab += ' ';
856
857 return code.replace(/\t/g, tab);
858};
859
860/**
861 * Replaces tabs with smart spaces.

Callers 1

shCore.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected