Mercurial
comparison markdown_converter/main.js @ 54:b3e82d22f961
[PostDog] Initial commit BROKEN
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Fri, 19 Dec 2025 13:58:52 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 53:82d1fe4d4ee6 | 54:b3e82d22f961 |
|---|---|
| 1 // # | |
| 2 // ## | |
| 3 // []() | |
| 4 // _ _ | |
| 5 // * * | |
| 6 // 1. | |
| 7 // - | |
| 8 // \s\s | |
| 9 // | |
| 10 | |
| 11 function Lexer(character) { | |
| 12 } | |
| 13 | |
| 14 /** | |
| 15 * @params | |
| 16 * value: string | |
| 17 */ | |
| 18 function mardownConverter(value) { | |
| 19 let i = 0; | |
| 20 let character; | |
| 21 const domElements = []; | |
| 22 while (i < value.length) { | |
| 23 character = value[i] | |
| 24 switch(character) { | |
| 25 case "#": { | |
| 26 if | |
| 27 const dom = document.createElement("h1"); | |
| 28 domElements.append(dom) | |
| 29 } | |
| 30 case "_": { | |
| 31 } | |
| 32 case "_" { | |
| 33 } | |
| 34 case "*" { | |
| 35 } | |
| 36 default { | |
| 37 return character; | |
| 38 } | |
| 39 } | |
| 40 } | |
| 41 } |