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

Address HTML minifier warnings caused by malformed MDX and HTML #1033

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

sserrata
Copy link
Member

@sserrata sserrata commented Dec 3, 2024

Description

Addresses the warnings seen when performing production build:

[WARNING] Docusaurus static site generation process emitted warnings for 4 paths
This is non-critical and can be disabled with DOCUSAURUS_IGNORE_SSG_WARNINGS=true
Troubleshooting guide: https://github.com/facebook/docusaurus/discussions/10580

- "/petstore_versioned/1.0.0/swagger-petstore-yaml":
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":21328,"start":21324}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Start tag "a" seen but an element of the same type was already open - {"primary_spans":[{"end":22536,"start":22459}],"span_labels":[]}
  - [HTML minifier diagnostic - error] End tag "a" violates nesting rules - {"primary_spans":[{"end":22536,"start":22459}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Stray end tag "a" - {"primary_spans":[{"end":22572,"start":22568}],"span_labels":[]}

- "/petstore_versioned/swagger-petstore-yaml":
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":22180,"start":22176}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":24141,"start":24137}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":24301,"start":24297}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Start tag "a" seen but an element of the same type was already open - {"primary_spans":[{"end":25207,"start":25130}],"span_labels":[]}
  - [HTML minifier diagnostic - error] End tag "a" violates nesting rules - {"primary_spans":[{"end":25207,"start":25130}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Stray end tag "a" - {"primary_spans":[{"end":25243,"start":25239}],"span_labels":[]}

- "/petstore/swagger-petstore-yaml":
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":23476,"start":23472}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":25437,"start":25433}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":25597,"start":25593}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Start tag "a" seen but an element of the same type was already open - {"primary_spans":[{"end":26503,"start":26426}],"span_labels":[]}
  - [HTML minifier diagnostic - error] End tag "a" violates nesting rules - {"primary_spans":[{"end":26503,"start":26426}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Stray end tag "a" - {"primary_spans":[{"end":26539,"start":26535}],"span_labels":[]}

- "/petstore31/swagger-petstore-yaml":
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":22458,"start":22454}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":24419,"start":24415}],"span_labels":[]}
  - [HTML minifier diagnostic - error] No "p" element in scope but a "p" end tag seen - {"primary_spans":[{"end":24579,"start":24575}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Start tag "a" seen but an element of the same type was already open - {"primary_spans":[{"end":25485,"start":25408}],"span_labels":[]}
  - [HTML minifier diagnostic - error] End tag "a" violates nesting rules - {"primary_spans":[{"end":25485,"start":25408}],"span_labels":[]}
  - [HTML minifier diagnostic - error] Stray end tag "a" - {"primary_spans":[{"end":25521,"start":25517}],"span_labels":[]}
  - ```

## Motivation and Context

See https://github.com/facebook/docusaurus/discussions/10580 for background

## How Has This Been Tested?

Tested with demo site

## Screenshots (if appropriate)

<!--- Drag any screenshots here or delete this section -->

## Types of changes

<!--- What types of changes does your code introduce? -->
<!--- PICK ONE: -->

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)

## Checklist

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes if appropriate.
- [ ] All new and existing tests passed.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@sserrata sserrata added bug Something isn't working v4.0.0 v4.0.0 labels Dec 3, 2024
@sserrata sserrata requested a review from blindaa121 December 3, 2024 18:29
@sserrata sserrata self-assigned this Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Size Change: -110 B (-0.01%)

Total Size: 2.02 MB

Filename Size Change
demo/build/petstore/swagger-petstore-yaml/index.html 27.8 kB -110 B (-0.39%)
ℹ️ View Unchanged
Filename Size
demo/.docusaurus/codeTranslations.json 2 B
demo/.docusaurus/docusaurus.config.mjs 13.9 kB
demo/.docusaurus/globalData.json 38.6 kB
demo/.docusaurus/i18n.json 267 B
demo/.docusaurus/registry.js 56.9 kB
demo/.docusaurus/routes.js 52.6 kB
demo/.docusaurus/routesChunkNames.json 21.8 kB
demo/.docusaurus/site-metadata.json 1.23 kB
demo/build/assets/css/styles.********.css 146 kB
demo/build/assets/js/main.********.js 692 kB
demo/build/assets/js/runtime~main.********.js 15.2 kB
demo/build/index.html 90.4 kB
demo/build/petstore/add-pet/index.html 27.4 kB
demo/build/petstore/create-user/index.html 21.5 kB
demo/build/petstore/create-users-with-array-input/index.html 21.5 kB
demo/build/petstore/create-users-with-list-input/index.html 21.5 kB
demo/build/petstore/delete-order/index.html 21.5 kB
demo/build/petstore/delete-pet/index.html 21.6 kB
demo/build/petstore/delete-user/index.html 21.8 kB
demo/build/petstore/find-pets-by-status/index.html 22.3 kB
demo/build/petstore/find-pets-by-tags/index.html 22.9 kB
demo/build/petstore/get-inventory/index.html 20.8 kB
demo/build/petstore/get-order-by-id/index.html 21.8 kB
demo/build/petstore/get-pet-by-id/index.html 22.4 kB
demo/build/petstore/get-user-by-name/index.html 21.9 kB
demo/build/petstore/login-user/index.html 22.4 kB
demo/build/petstore/logout-user/index.html 21.2 kB
demo/build/petstore/new-pet/index.html 21.8 kB
demo/build/petstore/pet/index.html 23.5 kB
demo/build/petstore/place-order/index.html 21 kB
demo/build/petstore/schemas/apiresponse/index.html 22.8 kB
demo/build/petstore/schemas/cat/index.html 36.7 kB
demo/build/petstore/schemas/category/index.html 23.9 kB
demo/build/petstore/schemas/dog/index.html 37.1 kB
demo/build/petstore/schemas/honeybee/index.html 37.2 kB
demo/build/petstore/schemas/id/index.html 20.9 kB
demo/build/petstore/schemas/order/index.html 25 kB
demo/build/petstore/schemas/pet/index.html 36.6 kB
demo/build/petstore/schemas/tag/index.html 22.3 kB
demo/build/petstore/schemas/user/index.html 44.8 kB
demo/build/petstore/store/index.html 21.5 kB
demo/build/petstore/subscribe-to-the-store-events/index.html 27.8 kB
demo/build/petstore/update-pet-with-form/index.html 21.7 kB
demo/build/petstore/update-pet/index.html 22.2 kB
demo/build/petstore/update-user/index.html 21.8 kB
demo/build/petstore/upload-file/index.html 21.6 kB
demo/build/petstore/user/index.html 22.4 kB

compressed-size-action

Copy link

github-actions bot commented Dec 3, 2024

Visit the preview URL for this PR (updated for commit 52fe4ae):

https://docusaurus-openapi-36b86--pr1033-bf659kme.web.app

(expires Thu, 02 Jan 2025 19:24:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

Copy link
Collaborator

@blindaa121 blindaa121 left a comment

Choose a reason for hiding this comment

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

🚀

@blindaa121 blindaa121 merged commit 1bd7b94 into main Dec 3, 2024
9 checks passed
@sserrata sserrata deleted the mdx-parsing branch December 3, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v4.0.0 v4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants