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 tests and functionality for handling double quotes in file names in FileTree #2641

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

iskandersierra
Copy link

Description

  • Closes Allow quoted file names in FileTree #2608
  • What does this PR change?
    Allows to use double quotes in FileTree component to indicate the full file name in cases where the file name contains white space. Like: - "my file name" this is the comment
  • Did you change something visual?
    Yes, but I don't know how to test the visuals from this project. I just added some tests for this case and change the code parsing the content of the list.
    I would still need to update the docs

Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: 2228547

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Nov 28, 2024
@astrobot-houston
Copy link
Collaborator

Hello! Thank you for opening your first PR to Starlight! ✨

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🤩

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 2228547
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6748b3543625d600087598bd
😎 Deploy Preview https://deploy-preview-2641--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the 📚 docs Documentation website changes label Nov 28, 2024
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Nov 28, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en components/file-tree.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@iskandersierra
Copy link
Author

I might need to consider detecting the special double-quotes and because the markdown is turning the regular double quotes into those.

image

@iskandersierra
Copy link
Author

It is working when the comments contain some nodes, but not when the comments are plain text
image

@iskandersierra
Copy link
Author

I think there is no need to implement this feature as proposed. There is already away to create a file name with spaces, if we use a tag like <span> to enclose the file name.

Maybe the only required change is in the docs to indicate that fact, but there is no need to complicate things with using quotes because they introduce too many cases when combined with markup tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants