Closed brennen closed 3 years ago
I wasn't aware that this was a format acceptable for vimwiki code blocks. The
reason it isn't outputting <pre>
is because the parser doesn't recognize it
as such.
Not that this would make much sense to you, but this is the parser for the start of a code block. It assumes {{{lang?( key="value")*
.
I wasn't aware that this was a format acceptable for vimwiki code blocks. The reason it isn't outputting
<pre>
is because the parser doesn't recognize it as such.
That's probably reasonable. The behavior could probably stand to be better defined in the plugin and docs, but I'm essentially just wedging something into a corner case of the implementation. (It's possible a few others are doing something similar following my example, but it's never been an official thing.) I wouldn't worry about this one much; I can adjust accordingly.
Anyway, something like
{{{language exec="foo"
}}}
...wouldn't be quite as concise, but it has the advantage of being more explicit.
@brennen you should be able to do it without a language as the language itself is optional.
{{{exec="foo"
}}}
At 5443ff17.
As a summary: I've got some scripting to execute shell inline and pull in the results.
This is kind of edge case - the docs just specify stuff after the
{{{
as "extra information", and in practice the vimscript implementation just drops it into the HTML after escaping entities, while the vim plugin itself treats it (or the last word in it?) as a filetype hint for syntax highlighting. That is: This might be my problem to fix; I'm overloading ill-defined behavior to suit a customization.Still, I'd probably expect a
<pre>
tag here, maybe just one with<pre class="exec-raw echo foo">
or something based on how it behaves for a simpler case like{{{php
?Input:
vimwiki-rs output:
vimscript output: