conda-incubator / conda-store-ui

conda-store-ui is a frontend for conda-store powered by react
https://conda-incubator.github.io/conda-store-ui/
BSD 3-Clause "New" or "Revised" License
13 stars 21 forks source link

Wrap env description in quotes #278

Closed nkaretnikov closed 1 year ago

nkaretnikov commented 1 year ago

Fixes #274.

nkaretnikov commented 1 year ago

The error comes from the YAML parser. I wrap the description value in quotes before passing it further.

This avoids YAML syntax errors like this (this example won't work in the old UI either because it's invalid syntax):

description: this is invalid : because it has two colons and no quotes

Verified that links and colons work now.

New UI:

Screen Shot 2023-08-28 at 11 24 56

Old UI (same env):

Screen Shot 2023-08-28 at 11 25 20
nkaretnikov commented 1 year ago

Note: this will still fail to parse a description containing a single quote (because it will be parsed as the terminating quote, leading to a syntax error). I've decided not to address this as part of this PR.

kcpevey commented 1 year ago

Note: this will still fail to parse a description containing a single quote (because it will be parsed as the terminating quote, leading to a syntax error). I've decided not to address this as part of this PR.

@nkaretnikov That works for me. Can you open up an issue to track?