Closed ladislas closed 4 years ago
Internal Jira reference: https://jira.arm.com/browse/IOTDOCS-1334
@ladislas Thank you for raising this issue. Our rendered website does not currently work with the diff
feature. However, we can add code comments to these snippets to show what has changed.
Comments sound good as well be could we have both? Maybe I'm the only one but I prefer reading the docs on Github where diff
works ;)
After looking into it, I don't think we can add comments. I don't think a .json allows any type of code comments. Do you think moving the changes above the code block would help?
I don't think a .json allows any type of code comments
You're right, but is the json going to be used for real or just for documentation? If it's just for documentation, adding a comment as bellow is not a big deal IMHO.
{
"json": [
"rigid",
"better for data interchange" # change here
],
"yaml": [
"slim and flexible", # change also here
"better for configuration"
]
}
At least they stand out 😂
Another option is to keep the diff format but without highlighting. The -
shows what you must remove and the +
what you need to add.
- I2C_SCL = D15,
- I2C_SDA = D14,
+ I2C_SCL = PC_0,
+ I2C_SDA = PC_1,
Changes need to be made to custom_targets.json
to use Mbed OS on a custom board, so I don't think adding comments will work.
I've created a PR that moves the changes above the snippet to make the changes more obvious: https://github.com/ARMmbed/mbed-os-5-docs/pull/1223
Thanks again for raising this issue 👍 I'm closing it now that PR #1223 has merged.
Docs issue template
While reading the Custom Target Porting documentation, I found myself wishing to have long configuration changes displayed as
diff
instead of the final result. This could also be applied to short changes.Page link
https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/porting/custom-target-porting.md#customizing
Expected to find...
For long changes: (changes are not real, it just for the example)
For example on small changes:
or
or
Found
to