Go to file
Hans Fast 0638e97cef initial commit: working repoduction 2026-03-18 14:07:57 +01:00
css initial commit: working repoduction 2026-03-18 14:07:57 +01:00
README.md initial commit: working repoduction 2026-03-18 14:07:57 +01:00
_index.md initial commit: working repoduction 2026-03-18 14:07:57 +01:00
ad_hello_pub.md initial commit: working repoduction 2026-03-18 14:07:57 +01:00
addFilenameData.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00
addMoreFilenameData.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00
base_html.ori initial commit: working repoduction 2026-03-18 14:07:57 +01:00
extractSummary.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00
filenameparser.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00
indexPage.ori initial commit: working repoduction 2026-03-18 14:07:57 +01:00
page.ori initial commit: working repoduction 2026-03-18 14:07:57 +01:00
pageSummaries.ori.html initial commit: working repoduction 2026-03-18 14:07:57 +01:00
parseHtml.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00
pipeline.ori initial commit: working repoduction 2026-03-18 14:07:57 +01:00
removePrivate.js initial commit: working repoduction 2026-03-18 14:07:57 +01:00

README.md

  • addFilenameData.js called twice at startup (it logs the key)
  • called again when allfiles/ad_hello_pub.md requested, but now the key has a trailing slash.
  • note: again, it's called twice, but the first time the key doesn't have a slash, and the second time, it does, which causes
    • this looks like a server redirect causing issues ...
    • but when I use the cli the key gets logged three times: ori pipeline.ori()/allfiles/ad_hello_pub.md
  • the parser (PeggyJS grammmar) doesn't expect a trailing slash and errors.
  • when renderedPages/hello.html is requested, the parser sees the filename without trailing slash, and runs successfully.

It also seems like addFilenameData.js is being called for every entry in the original map: all three markdown files in the directory. huh? It seems like the key which the server requests is propagating up the pipeline. Huh?

server log:

$ ori "serve watch ., =debug ./pipeline.ori()"
key: ad_hello_pub.md
key: ad_hello_pub.md
Server running at http://localhost:5000. Press Ctrl+C to stop.
/renderedPages/hello.html
key: ad_hello_pub.md
/allfiles/ad_hello_pub.md
key: ad_hello_pub.md
/allfiles/ad_hello_pub.md/
key: ad_hello_pub.md/
SyntaxError: Expected ".", [a-z0-9], or end of input but "/" found.
    at peg$buildStructuredError (file:///home/hans/exp/ori-repro-earlier-bug/filenameparser.js:356:12)
    at peg$throw (file:///home/hans/exp/ori-repro-earlier-bug/filenameparser.js:694:11)
    at peg$parse (file:///home/hans/exp/ori-repro-earlier-bug/filenameparser.js:716:5)
    at OrigamiFileMap.default (file:///home/hans/exp/ori-repro-earlier-bug/addFilenameData.js?cacheBust=1773838110056:5:15)
evaluating: addFilenameData.js(value, key)
    at pipeline.ori:14:58