Closed brennen closed 3 years ago
Additionally, noting explicitly that it feels a little weird that comments render as empty paragraphs:
Input:
== comments ==
%% this is a comment
%% another comment
Output:
<div id="comments"><h2 id="comments" class="header"><a href="#comments">comments</a></h2></div>
<p></p>
<p></p>
Or I guess maybe the blank lines between the comments render as empty paras?
== comments ==
%% this is a comment
%% another comment
Gives:
<div id="comments"><h2 id="comments" class="header"><a href="#comments">comments</a></h2></div>
<p> </p>
I should revise html output of empty paragraphs to be nothing.
Separately, comments are supposed to be the first thing processed when it comes to inline content. I'll have to write up some tests based on your examples and figure out what's up.
Thanks for these!
I think https://github.com/chipsenkbeil/vimwiki-rs/commit/35498bf42be6a28c2f9d72680eda09a99f4e455a solves the "key must be a string" error. Those should never be a true problem, by the way, as it just prevents caching from happening but not the actual conversion to html.
As for the comment becoming a definition list, I think I'll need to revise the parser a little bit. Definition list has higher priority than paragraph and the term (what comes before ::
) allows pretty much any character including %%
; so, I think it's eating the comment.
@brennen give https://github.com/chipsenkbeil/vimwiki-rs/commit/d339b69c13eadb63db60b62cd26db3a1d0c0dbeb a go to see if that fixes the issue.
No more error message and the comments aren't rendered as definition lists, looks good!
I've got comments of the following form in a diary entry from some years back:
I think I was messing around with timestamping stuff in my worklog for the day or something. Anyway, this causes a "failed to write cache: key must be a string" error, and unexpectedly renders the comment as a definition list (also with the tag rendering from #120).
Input:
Output: