https://pantsbuild.org/ logo
h

happy-kitchen-89482

07/18/2022, 8:24 PM
To name just two from about 10
Any thoughts as to why?
h

hundreds-father-404

07/18/2022, 8:24 PM
have we run it in the past month? I have not.
h

happy-kitchen-89482

07/18/2022, 9:01 PM
I thought I had run it a few times
When I had made updates recently
Ah well, in script we trust
💵 1
Grr, just noticed that when we sync up code blocks they're formatted as vanilla ones, not fancy readme ones
h

hundreds-father-404

07/18/2022, 9:46 PM
what do you mean?
h

happy-kitchen-89482

07/18/2022, 9:46 PM
It doesn't have the filename tab and all that. It's not formatted like a "Code Sample" widget.
h

hundreds-father-404

07/18/2022, 9:49 PM
I think that's a bug with Readme's rendering. The metadata is there if you look in the admin editor
Maybe file a bug w/ their chat?
h

happy-kitchen-89482

07/18/2022, 9:54 PM
I don't think it's a bug per se
I've asked them about it
but if I create a new Code Sample block then in the raw markdown it's this:
Copy code
[block:code]
{
  "codes": [
    {
      "code": "BLAH",
      "language": "text",
      "name": "FOO"
    }
  ]
}
[/block]
Not a triple-backticks thing
When we did the one-time export from readme, my guess is all those got converted to regular markdown code blocks
so we've lost the information
Which was going to happen when if we moved to sphinx anyway, but it's a shame it already has
h

hundreds-father-404

07/18/2022, 9:56 PM
I don't think the information is lost. If you look in the editor for the options page on 2.12, all the file names are there. They only do not render
h

happy-kitchen-89482

07/18/2022, 9:56 PM
See above for what custom markdown is required in order to render those blocks
h

hundreds-father-404

07/18/2022, 9:56 PM
but if I create a new Code Sample block then in the raw markdown it's this:
Are you using the old editor? It should not be this. It should be new style markdown
See above for what custom markdown is required in order to render those blocks
Nack
h

happy-kitchen-89482

07/18/2022, 9:57 PM
hmm, let's see
h

hundreds-father-404

07/18/2022, 9:57 PM
FYI this is how you create tabs:
```python f1.py
> print()
> ```
```python f2.py
> print()
> ```
may be worth trying out. I suspect they only render file names if >1 tab
h

happy-kitchen-89482

07/18/2022, 9:58 PM
There is no way to view the raw source in the new editor, apparently
may be worth trying out. I suspect they only render file names if >1 tab
h

hundreds-father-404

07/18/2022, 9:59 PM
The raw source == copy and paste the entire file with Cmd-A
h

happy-kitchen-89482

07/18/2022, 9:59 PM
That would be a huge regression if true
h

hundreds-father-404

07/18/2022, 9:59 PM
That would be a huge regression if true
Yep, which I suspect is a bug. The readme.com team is very responsive and would likely want to fix this
h

happy-kitchen-89482

07/21/2022, 11:48 PM
We were both right:
"This is a known issue on our end where code blocks with only a single code language aren't rendering as a tabbed interface. The only workaround at the moment is to manually convert the RDMD code blocks to our custom widget-based syntax. For instance, your Bash code sample here:
Copy code
bash
./pants --level=debug ...
would have to be re-written to look like this:
Copy code
[block:code]
{
  "codes": [
    {
      "code": "./pants --level=debug ...",
      "language": "bash"
    }
  ]
}
[/block]
"
h

hundreds-father-404

07/21/2022, 11:58 PM
Oof. What do you vote we do in the short term? (I think I'm anti
block
syntax because it's so clunky and hard to read)
h

happy-kitchen-89482

07/22/2022, 5:13 PM
I'm not sure, I will ask if they have an ETA for a fix
We can always preprocess before uploading I guess?
h

hundreds-father-404

07/22/2022, 5:28 PM
We can always preprocess before uploading I guess?
Sort of. We right now run the readme tool directly I think. So we'd add a new step to the process
h

happy-kitchen-89482

07/22/2022, 5:40 PM
Or just bite the sphinx bullet
h

hundreds-father-404

07/22/2022, 5:47 PM
yeah, I'd really like that for other reasons like nesting. But do fear it would be at least a 1 week project
4 Views