Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Description
The problem
The documentation shows a diff on some pages, to indicate what changes need to be made to (generated) code. While this is nice to have, it doesn't allow the user to just copy paste the new code. This means users need to go line by line copy pasting the results, type it over manually, or copy paste the whole thing, and remove the+ , and remove lines with a-.
For example in thejson login there is a diff of the changes users should make from the template.

The solution
I can see 2 ways of solving this. The first way would be to make tabs like we use for showing configs in PHP/Yaml/XML etc, and write both the diff and the output.
A better solution would be to generate the output diff based on the diff. This would introduce more complexity in the docs builder, but would make it easier for users writing documentation.