docs.page
docs.page copied to clipboard
`console` syntax breaks preview
Reproduction steps
-
Put this in some
.mdxfile:```console $ adb shell uiautomator dump ```
-
Try to open that
.mdxfile using Local Preview feature. It should not work.
Also, the leading $ is cropped. This is annoying.
I'll look into this ASAP :) thanks!
Thanks!
Also, as a side note, it'd be great to have the leading dollar sign ($) not be copied if the code block type is set to console. Something like this.
Believe i've fixed this in https://github.com/invertase/docs.page/pull/237 , hopefully will go into the next update.
Thanks a ton @cabljac! 💙😁
I think this can be closed since #237 was merged.
cc @cabljac
BTW, how can I know if the PR that was merged is already released? I don't see any git tags in this repo, do you deploy docs.page directly from master?
Hey @cabljac, I see this is merged, but copying still copies the leading $.
Just deployed a new version of docs page with a massively simplified api and codebase. Going to work through some old issues to make sure they're sorted tomorrow.
Yeah the new UI is sleek! Great job!
Is it just the $ symbol we shouldn't be copying for console blocks, or are there other symbols we need to take into consideration?
TBH, I don't know, I usually see and use the $.
I think that a leading # (for the super user mode) might be a good candidate for remove-on-copy as well.
Thinking about it now, I got another idea.
The $ should be added automatically if console syntax is specified. No need for the user to start every line with a $.