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

Add code formatting to table headers & cells #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arcataroger
Copy link
Member

I know we're trying to minimize changes to this repo pending a rewrite, but is this small tweak to table formatting ok? It just formats `backtick_formatted_code` into proper <code>HTML code blocks</code>.

Uses dangerouslySetInnerHTML with lodash.escape().

Before

(From https://www.datocms.com/docs/plugin-sdk/field-extensions#reference-table-field-types--internal-names)

Backticks are literals:
Screenshot 000588

After

Backticks are now properly code-blocked:
Screenshot 000589

Other tables are still OK:
Screenshot 000586

Screenshot 000587

@arcataroger arcataroger added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 14, 2024
@arcataroger arcataroger self-assigned this Nov 14, 2024
Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 9:41pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant