added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
35
EnlighterJS/Source/Language/Markdown.js
Normal file
35
EnlighterJS/Source/Language/Markdown.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
---
|
||||
description: Markdown language
|
||||
|
||||
license: MIT-style
|
||||
|
||||
authors:
|
||||
- Jose Prado
|
||||
- Andi Dittrich
|
||||
|
||||
requires:
|
||||
- Core/1.4.5
|
||||
|
||||
provides: [EnlighterJS.Language.markdown]
|
||||
...
|
||||
*/
|
||||
EJS.Language.markdown = new Class ({
|
||||
|
||||
Extends: EJS.Language.generic,
|
||||
|
||||
setupLanguage: function(code){
|
||||
this.patterns = {
|
||||
'header1': { pattern: /^(.+)\n=+\n/gim, alias: 'st1' },
|
||||
'header2': { pattern: /^(.+)\n-+\n/gim, alias: 'st2' },
|
||||
'header3': { pattern: /[#]{1,6}.*/gim, alias: 'st0' },
|
||||
'ul': { pattern: /^\*\s*.*/gim, alias: 'kw1' },
|
||||
'ol': { pattern: /^\d+\..*/gim, alias: 'kw1' },
|
||||
'italics': { pattern: /\*.*?\*/g, alias: 'kw3' },
|
||||
'bold': { pattern: /\*\*.*?\*\*/g, alias: 'kw3' },
|
||||
'url': { pattern: /\[[^\]]*\]\([^\)]*\)/g, alias: 'kw4' }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue