out-of-cheese-error / gooseberry

A command line utility to generate a knowledge base from Hypothesis annotations
Apache License 2.0
152 stars 9 forks source link

Newlines in annotations aren't escaped in preview #74

Closed ngirard closed 3 years ago

ngirard commented 3 years ago

Using home-made binary from the trunk, on Ubuntu 20.04. Here's an example output of gooseberry search:

Screenshot_20210413_164714

Installed the very last version of Bat, to no effect.

Ninjani commented 3 years ago

Is bat working on other markdown files with the settings bat -l markdown --color=always -p?

ngirard commented 3 years ago

Is bat working on other markdown files with the settings bat -l markdown --color=always -p?

My bad, I misread you and thought these options had to be added somewhere in Gooseberry's config.

Sure, Bat displays my markdown files just fine. There's nothing related to Bat or a custom pager in my configuration (as far as I could check).

Ninjani commented 3 years ago

Hmm, okay let's try to narrow down what's causing this - do you see the same thing happening when you run gooseberry view? (Probably a good idea to filter to a particular pattern/day so your terminal isn't filled with output)

ngirard commented 3 years ago

do you see the same thing happening when you run gooseberry view?

I don't.

Ninjani commented 3 years ago

Okay, then it seems to be a skim issue. The relevant function is here - could you try removing the "-p" in the command and see what change that has?

Ninjani commented 3 years ago

Oh wait, why is that a {:?}!

Ninjani commented 3 years ago

Okay, I think I tried to get away with not escaping newlines etc by using {:?} but guess that doesn't work on Ubuntu sigh.

Ninjani commented 3 years ago

"echo \"{}\" | bat -l markdown --color=always -p",

Can you try this (on line 60)?

ngirard commented 3 years ago

I was expecting the worst... but it worked ! Well done !

Ninjani commented 3 years ago

Haha great! I should probably figure out how to test interactivity across devices but until then I'm really appreciating these issues, will be in the next release.

ngirard commented 3 years ago

Well then, I'd appreciate you pushed a new release, to spare me with the build --release. But if not, no big deal !

Ninjani commented 3 years ago

Well then, I'd appreciate you pushed a new release

Done!