SquidDev / illuaminate

Very WIP static analysis for Lua
https://squiddev.cc/illuaminate/
BSD 3-Clause "New" or "Revised" License
49 stars 2 forks source link

doc-gen erroring on .md files with no newline at the end #23

Closed SkyTheCodeMaster closed 3 years ago

SkyTheCodeMaster commented 3 years ago

From a discussion in the CC-Tweaked repo.

I ran ./illuaminate doc-gen with a markdown file /src/main/skyos/graphic.md, with the contents being:

---
module: [kind=skyos] graphic
---

This is the graphical lib of SkyOS

Note that there is no newline at the end of this file. If there is, this error doesn't occur.

apehso3@apehso3-ubuntu:~/SkyDocs$ ./illuaminate doc-gen
illuaminate: internal error, uncaught exception:
             Invalid_argument("offset 95 invalid: 0 <= offset < 38")
             Raised at file "stdlib.ml", line 30, characters 20-45
             Called from file "src/core/span.ml", line 130, characters 6-84
             Called from file "src/core/span.ml", line 176, characters 62-94
             Called from file "src/semantics/doc_parser.ml", line 216, characters 29-45
             Called from file "src/semantics/doc_parser.ml", line 221, characters 14-48
             Called from file "src/semantics/doc_parser.ml", line 546, characters 20-48
             Called from file "src/semantics/doc_parser.ml", line 763, characters 16-50
             Called from file "src/data/core.ml", line 219, characters 26-37
             Called from file "src/data/core.ml", line 256, characters 12-15
             Called from file "src/data/core.ml", line 286, characters 21-89
SquidDev commented 3 years ago

Thanks for the report! CI is currently a little sad right now, so not sure when a fixed version will be out.