Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage snippet in installation/precompilation is broken #124

Closed
scriptype opened this issue Jun 5, 2023 · 2 comments · Fixed by #130
Closed

Usage snippet in installation/precompilation is broken #124

scriptype opened this issue Jun 5, 2023 · 2 comments · Fixed by #130
Labels

Comments

@scriptype
Copy link

scriptype commented Jun 5, 2023

The snippet is empty as can be seen here (https://handlebarsjs.com/installation/precompilation.html#usage):
image

I did some tracing and found the corresponding part in the md:

!HANDLEBARS_HELP!

Which seems to be a custom syntax extension to VuePress' markdown, handled by this plugin here:

export function updateHandlebarsCliHelp() {

But the above part seems to be authored quite some time ago. So, I suspect that one or more of these things might have changed since 30f6884 and gone unnoticed:

  • The way md syntax extensions should be written
  • Path of the handlebars bin
  • The way handlebars bin should be run
  • The output when handlebars bin is run

Or maybe something else. But I'm not familiar with VuePress or tapping into md parsers, so I just wanted to report the issue and my contemplation on it ¯\(ツ)/¯ Hope this helps!

@jaylinski jaylinski added the bug label Jul 25, 2023
@scriptype
Copy link
Author

It looks like this is caused by using the stderr instead of stdout when the handlebars bin is run:

const { stderr } = cp.spawnSync(nodeExecutable, [handlebarsCli, "--help"], {

stderr is empty, so an empty string is printed.

@jaylinski
Copy link
Member

Thanks for the debugging, I opened a PR to fix the issue.

jaylinski added a commit that referenced this issue Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants