10 lines
294 B
JavaScript
10 lines
294 B
JavaScript
WMarkDown.converter.Modules.Headers = function(wmd){
|
|
|
|
this.pattern = [
|
|
/^(\#{1,6})([^\r\n\#]+)(\#{1,6})?$/m,
|
|
/^(\={1,6})([^\r\n\=]+)(\={1,6})?$/m
|
|
];
|
|
|
|
this.process = matches => `<h` + matches[1].length + `>` + matches[2].trim() + `</h` + matches[1].length + `>`;
|
|
|
|
}; |