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

Tabpane shortcodes: improved reporting of warnings and errors #1478

Merged
merged 2 commits into from
May 4, 2023

Conversation

deining
Copy link
Collaborator

@deining deining commented Mar 10, 2023

This PR follows up on #1448: Tabpane warning: make it easier to find source page.
Only now I realized that we can do even better here and report not only the source page, but also the offending position (line number) inside the page.
This PR improves various error messsages, they all report the position of the offending code now. Also the wording was improved for several messages, making them easier to understand.

@chalin
Copy link
Collaborator

chalin commented May 4, 2023

After rebasing, the build is failing. Can you take a look @deining?

1:25:54 PM: ERROR 2023/05/04 17:25:54 shortcode "tab" must be enclosed inside a "tabpane" block, but no parent block was found. Error position: "/opt/build/repo/userguide/content/en/docs/adding-content/shortcodes/index.md:431:309"

@chalin
Copy link
Collaborator

chalin commented May 4, 2023

The good think about the error, is that it tested the new error reporting code. It's great to be able to click and have VS Code deep link to the point of error!

I committed a minor fix to the docs. The build is now passing.

Copy link
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't do a detailed review, but looks like a great improvement overall!

@chalin chalin merged commit 15bb857 into google:main May 4, 2023
5 checks passed
@deining deining deleted the improve-tab-shortcode branch May 4, 2023 19:50
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.

None yet

2 participants