handlebars-lang / handlebars-lang/handlebars.js

The JavaScriptCompiler API docs sample code is broken as of 4.6

Open
#1,912 0 comments 0 reactions 0 assignees View on GitHub
docs-needed
Dominant language
JavaScript
Stars
18.7k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

Just a note, that the [sample code for subclassing JavaScriptCompiler in the docs](https://github.com/handlebars-lang/handlebars.js/blob/master/docs/compiler-api.md#javascript-compiler) is broken as of ~4.6 with:

TypeError: name.toLowerCase is not a function

(It works with handlebars 4.5 but fails with 4.6)

You can test this by swapping the handlebars.js version used in the [linked jsfiddle](https://jsfiddle.net/9D88g/162/) with the latest version (4.7.7).

Contributor guide

Open the contributing guide

Research direction

Start with the JavaScriptCompiler sample in docs/compiler-api.md and reproduce the reported TypeError using the linked JSFiddle with Handlebars 4.7.7. Compare the sample's behavior with 4.5, then update the documentation example so it runs against the current version and verify the corrected snippet in the fiddle.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.