-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
fix: allow also " inside of an embed #1598
fix: allow also " inside of an embed #1598
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/BJiGEnyE33rV1Pzk3UTtre7AHZqb |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 633f241:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sy-records
As we all know, this func getAndRemoveConfig
has been used for much places.
It seems we need separate it for different functions in case of unpredicted issues.
WDTY?
Yes, you're right. |
@Koooooo-7 What do you mean? |
This func r working in multi place to get configs. such as titles , sidebar headings. |
@Koooooo-7 I see what you're saying, although it seems very unlikely. My guess would be that there is no one relying on he non-working double quotes. It seems multiple people have hit this issue, and we closed the issues. It was in fact working before, then it broke: |
sure, will try that.
I dont think so. I would also like to use the double ones inside of headlines, or other stuff. Everywhere I can use this style. And another question, do you prefere an clean commit history, so should I rebase merge upstream changes? |
@luwol03 of cuz we can support this feat for those configs. instead, how about those titles/other stuff without configs but with " ? |
Then we should improve the function, so that it only replaces the quotes, if they are followed by a |
agreed. |
Is this normal, that your e2e tests failed? |
It seems not this changes broken, it's okay. |
@Koooooo-7 can you point them out for us? ESIT: Oh NVM, i see you checked already and think it is fine. |
Sometimes it fails for some reason despite that it shouldn't. Needs a fix. |
Before merge, I will try that:
|
Is anyone using it without the |
Here is an example without the colon: #1587 (comment)
|
str: `[filename](_media/example.md ":include")`, | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what the behavior should actually be. Seems funky that it leaves things behind. Seems like it should handle everything.
@jhildenbiddle One test or other keeps randomly failing. |
Investigating the failures. Let's not merge until we know it isn't the change from here. Seems unlikely that it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'm not requesting any changes, just blocking from merging to ensure the test is just flaky (that's what it seems like).
I re-ran the test like 6 times already, and one (at random) still keeps failing. |
I don't think we should do that, it could break this: Thanks @luwol03! Merging, since tests pass except one at random, which seems unrelated. |
Oh, A few seconds ago, I pushed my changes, before I relized, that you already merged this changes 😂 Can you please take a look at my new commit? @trusktr Should I open a new PR for that? |
@luwol03 You can open a new PR |
|
Summary
I fixed a bug where
":include"
is not handled like':include'
. This is not working because the type of quotes are not supported. The default prettier configuration changes the''
to""
. And if you have auto format toggled on, you're not be able to save the file with the right quotes.What kind of change does this PR introduce?
I added added the
"
also the the replace regexFor any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
closes #1597
closes #1587
closes #1555
closes #1005
Tested in the following browsers: