-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The current Lua code parser has an issue where it fails to parse or execute scripts that contain empty lines. This limitation restricts developers from writing clean and readable Lua code within XMDL files, as empty lines are commonly used for improving code clarity and separation of logic.
Steps to Reproduce:
- Write an XMDL file with a Lua script containing empty lines.
@lua{> local a = 10 local b = 20 local sum = a + b document.insertMarkdown("Sum: " .. sum) <} - Render the XMDL file in CwATE.
- Observe that the Lua code fails to execute.
Expected Behavior:
The Lua code parser should handle empty lines gracefully and execute the script without errors.
Actual Behavior:
The Lua code parser fails to execute the script if there are empty lines, leading to unexpected behavior or errors.
Proposed Solution:
- Update the Lua code parser to properly ignore or skip over empty lines while parsing the script.
- Add test cases to ensure the parser handles scripts with empty lines correctly.
Impact:
This issue affects the readability and maintainability of Lua scripts in XMDL files, as developers are forced to write compact code without empty lines.
Additional Notes:
Addressing this issue will improve developer experience and allow for better scripting practices within the CwATE platform.