mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
11 lines
339 B
JavaScript
11 lines
339 B
JavaScript
/**
|
|
* Strip any lines consisting only of spaces and tabs.
|
|
* This makes subsequent regexs easier to write, because we can
|
|
* match consecutive blank lines with /\n+/ instead of something
|
|
* contorted like /[ \t]*\n+/
|
|
*/
|
|
showdown.subParser('stripBlankLines', function (text) {
|
|
'use strict';
|
|
return text.replace(/^[ \t]+$/mg, '');
|
|
});
|