mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
When rendering a Node, Renderer looks up the NodeRenderer for that
node's kind in a slice. That will panic with an "index out of range"
error if a node renderer for that node kind has not been registered.
panic: runtime error: index out of range [1] with length 1
This changes Renderer to panic with a more helpful error message if the
node kind is unrecognized.
panic: unrecognized node kind Document cannot be rendered:
register a renderer for this node kind first
|
||
|---|---|---|
| .. | ||
| html | ||
| renderer.go | ||
| renderer_test.go | ||