-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change transcript info string format #5214
Comments
There are related changes suggested in #5199, in terms of what flags should exist. |
It seems like there’s a light consensus toward something like ```ucm {hide=all}
scratch/main> builtins.merge
```
```unison {error=intentional file="skritch.u"}
foo = bar
``` A starting point for discussing the set of options:
|
In #5394, I added both
So,
This doesn’t quite mesh with the |
To get back to basics, all that is really required for this is inserting a space, so that ``` unison:hide:error file becomes ``` unison :hide:error file We can make the space optional to start, which is a trivial change to the parser. I still think a richer syntax would be good, but not necessary to fix the CommonMark issue. (This is also another place we could add a warning – that the old syntax is deprecated.) |
🤦🏼 I just realized that putting a space there is already allowed, just not shown or documented. The docs should definitely prfer the version with a space. There are still some inconsistencies – like you can have a space in |
The bulk of this updates transcripts to put spaces around the language name in code blocks. E.g., ```` markdown ```ucm:hide ```` becomes ```` markdown ``` ucm :hide ```` This corresponds to https://share.unison-lang.org/@unison/website/contributions/11, which updates the docs in the same way. This is effectively a fix for unisonweb#5214, but that issue also has good recommendations for future changes to info strings, so I don’t know that it should be closed.
How about
Reading #5199 I wasn't clear on when you'd want |
@sellout This is done, right? |
The “necessary” part is done – allowing (and preferring) a space between the language and other tags. What still is incomplete is
The first one probably should just be a separate ticket. For the second, the motivation is much weaker now than it was before, so probably worth closing and waiting for a better reason to change it (e.g., if some info string structure gets standardized or some tooling has built-in support for some other format). |
Ok, #5494 now covers allowing tags to be in any order. And since we don’t have real motivation to change the tag format for now, this can be closed. |
Right now transcripts use an info string that looks like
language:flag:other-flag filename
, roughly – e.g.```unison:added-by-ucm scratch.u
.The GFM spec says the same thing. Neither seems to define “word”, unfortunately, so it’s hard to say what it means. But, in practice it seems to be basically space-delimited. What that means is that with the current syntax we use in transcripts, we end up with
becoming
when it should contain
<code class="language-unison">
.Despite GitHub not yet recognizing Unison, other places (e.g., my editor) can, but don’t highlight
unison:added-by-ucm
blocks, but my editor does highlight```unison added-by-ucm
blocks.I propose that we change the syntax. The minimal change would be to replace the first
:
with a space, so```unison added-by-ucm scratch.u
… but there are already cases where we have the file name, but no flags provided, which would be ambiguous. So I wonder if we can come up with a more consistent set of flags that are amenable to Unison adding more in the future.The text was updated successfully, but these errors were encountered: