-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix
transition:name
can be unicode (#9822)
* fix: fix `transition:name` can be unicode * delete prefix - * use for func * add changeset * Update .changeset/cold-bobcats-shave.md Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * fix review issue * fix review issue * add comment * add \ to regex * fix some issue * delete unused import * remove a rule * remove valid rule -- * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * Update transition.ts Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> * format * use cssesc to escape name * test: add e2e test * add charset for layout * use the raw value for e2e test * use cssesc instead of toValidIdent * uncomment --------- Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
- Loading branch information
1 parent
00e6adb
commit bd880e8
Showing
7 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"astro": patch | ||
--- | ||
|
||
Applies the correct escaping to identifiers used with `transition:name`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/astro/e2e/fixtures/view-transitions/src/pages/transition-name.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
import Layout from '../components/Layout.astro'; | ||
--- | ||
<Layout> | ||
<div id="one" transition:name="front-end">front-end</div> | ||
<div id="two" transition:name="开源">开源</div> | ||
<div id="three" transition:name="开a源">开a源</div> | ||
<div id="four" transition:name="c开a源c">c开a源c</div> | ||
<div id="five" transition:name="オープンソース">オープンソース</div> | ||
<div id="six" transition:name="开$源">开$源</div> | ||
<div id="seven" transition:name="开.源">开.源</div> | ||
<div id="eight" transition:name="🐎👱❤">🐎👱❤</div> | ||
<div id="nine" transition:name="--9">--9</div> | ||
<div id="ten" transition:name="10">10</div> | ||
<div id="eleven" transition:name="-11">-11</div> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.