mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
15 lines
389 B
JavaScript
15 lines
389 B
JavaScript
|
/**
|
||
|
* Created by Estevao on 11-01-2015.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* 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, '');
|
||
|
});
|