And I don't use renderer at all.
vlmatch = re.match('^\\s*:vega-lite',lines[0].lower())
...
elif vlmatch:
self.out_vl(lines[1:])
lines = []
...
def out_vl(self, s):
_content = {
'data': {
'application/vnd.vegalite.v4+json': eval(" ".join(s))
},
'metadata':{},
'transient':{}
}
self.send_response(self.iopub_socket, 'display_data', _content)
The biggest problem was to realize that I have to evaluate string to get dict. ;)