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

Some information is not rendering correctly on the Safari browser #813

Closed
AlfG71 opened this issue Feb 11, 2023 · 2 comments
Closed

Some information is not rendering correctly on the Safari browser #813

AlfG71 opened this issue Feb 11, 2023 · 2 comments
Assignees

Comments

@AlfG71
Copy link

AlfG71 commented Feb 11, 2023

On this page of the documentation, there is a comment that begins with **Note in a yellow box that stops rendering at the first backtick that mentions the <script> element.

The content displayed should be:

Note: When you download jQuery, the file name may contain a version number, e.g., jquery-x.y.z.js. Make sure to either rename this file to jquery.js or update the src attribute of the <script> element to match the file name.

The actual content that appears is:

Note: When you download jQuery, the file name may contain a version number, e.g., jquery-x.y.z.js. Make sure to either rename this file to jquery.js or update the src attribute of the `

@Krinkle
Copy link
Member

Krinkle commented Mar 26, 2023

Thanks @AlfG71, I've confirmed the issue:

Screenshot 2023-03-25 at 21 03 42

The source is at https://github.com/jquery/learn.jquery.com/blob/f2baa777409abd3343968bb7c42172439dad404c/page/about-jquery/how-jquery-works.md, which does include backticks already:

<div class="warning">**Note**: When you download jQuery, the file
name may contain a version number, e.g., `jquery-x.y.z.js`. Make
sure to either rename this file to `jquery.js` or update the `src`
attribute of the `<script>` element to match the file name.</div>

The specific markdown parser used by grunt-jquery-content is called marked (from @markedjs). There has been some discussion there over the years about how to support Markdown inside a <div> element at markedjs/marked#488 and markedjs/marked#985. In a nut shell, it seems adding a line break will mitigate the issue. Without it it treats the entire line as raw HTML.

@Krinkle Krinkle self-assigned this Mar 26, 2023
@Krinkle
Copy link
Member

Krinkle commented Mar 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants