()
| 370 | |
| 371 | /* Main parser function for the code */ |
| 372 | function parseCode() { |
| 373 | const e = document.getElementsByClassName('CodeMirror-code'); |
| 374 | if (e !== undefined && e.length > 0) { |
| 375 | const elem = e[0]; |
| 376 | let parsedCode = ''; |
| 377 | const textArr = elem.innerText.split('\n'); |
| 378 | for (let i = 1; i < textArr.length; i += 2) { |
| 379 | parsedCode += `${textArr[i]}\n`; |
| 380 | } |
| 381 | return parsedCode; |
| 382 | } |
| 383 | return null; |
| 384 | } |
| 385 | |
| 386 | /* Util function to check if an element exists */ |
| 387 | function checkElem(elem) { |
nothing calls this directly
no outgoing calls
no test coverage detected