Support for shortlinks?

A bit of a teaser, but as part of the stuff I’m working on as part of Space Lua I’ll likely be adding a ${lua expression} syntax, which will Live Preview to whatever markdown that expression returns.

This would mean you can easily define a function named bug that could return markdown linking to a bug.

Concept code (but not really, since this already works on Edge, just don’t use it yet as some key things may still change):

Anywhere in your space:

```space-lua
function bug(id)
  return "[Bug #" .. id .. "](https://bugtracker.company-internal.com/show_bug?id=" .. id .. ")"
end
```

And you can then use it anywhere else like this:

See this bug: ${bug "10"}, or if you prefer ${bug(10)}

Which would render to Bug #10

3 Likes