feat: use backticks to emphasize names
current:
fn container.array
### fn container.array
suggested:
fn container.array
### fn `container.array`
This project generates Markdown – so the whole Markdown syntax set is available ;)
Yep! I wanted to file an issue to see what you thought of the suggestion. Happy to submit a PR if you agree
Oh right, this is about the generated part, not the one taken from Jsonnet. Misunderstood while reading on mobile.
After all, I tried to mimic what godoc does, and it does not use <code> there. If this is for a reason, I don't know. Personally, I like the current style, also because monospaced fonts tend to steal more focus from the eye than needed here.
I'd rather suggest making them <a> links, which also highlights them in color and makes it easier to link to html sections. WDYT?
Color would be great! What would it link to?
It GoDoc, it links back to the source code. And although I would love that, I think it wouldn't totally make sense here, unless the user specified the URL (relative) to use due to the lazy evaluation of jsonnet.
Likely though, that's going to be hard to maintain for users.
For starters, it could link to the respective html permalink, even though source code would be super awesome
std.thisFile returns the full path to jsonnet file being evaluated.
❯ jsonnet ~/tmp/test.jsonnet
{
"filename": "/Users/wmcnamee/tmp/test.jsonnet"
}
Some light testing indicates that you cannot do this for the user though (e.g. put std.thisFile within a function, and somehow find the callers file).
you might be able to do some magic with though if the user provided the library with the filename.
d.fn(filename=std.thisFile)
then work out where the root of the repo is, and strip out everything lower than the repo root.