Skip to content
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

Fix Empty examples are shown on several reference pages #560

Closed
wants to merge 1 commit into from

Conversation

shibomb
Copy link
Contributor

@shibomb shibomb commented Sep 20, 2024

resolves #559

Changes

Corrected separator strings in some reference page examples.

@davepagurek
Copy link
Collaborator

Thanks for making these changes! The ones in the en/ folder get automatically generated when we run npm run build:reference, which pulls in the contents from the p5.js repo. If we want the changes to stick around, I think we'll have to do them automatically in the build script. Maybe we can edit that to automatically apply the formatting changes here?

The conversion from the JSON data to the mdx file happens here, I believe:

const convertToMDX = async (

@shibomb
Copy link
Contributor Author

shibomb commented Sep 21, 2024

@davepagurek
Thank you for letting us know that the English version will be converted and about the generator.

I have re-examined it:
The blank line at the end of the example in the function document in the p5.js source code seems to cause this problem.
e.g. line function's example
https://github.com/processing/p5.js/blob/main/src/core/shape/2d_primitives.js
line:702 empty row

 * </div>
 *
 */

This problem can be solved by removing the blank line in the p5.js source code.
However, even if we fix it, there is a possibility that these blank lines will reappear in the future.

So, I thought of a way to remove the last blank line in the website-side generator that you advised.
I will create PR.

@shibomb
Copy link
Contributor Author

shibomb commented Oct 8, 2024

If #561 is merged, this pull request is unnecessary and I have withdrawn it.
see: #561 (comment)

@shibomb shibomb closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty examples are shown on several reference pages.
2 participants