Comments (1)
I was thinking about this a bit. I already factored this out into generator.createAnchor
.
The changes needed are a bit complex though.
- The previous sibling needs to know if the next sibling is a static element or not to avoid creating an anchor.
- And the next sibling needs to know that is actually needs to create an identifier (see
needsIdentifier
ofgenerator.addElement
).
I would have to read through your snippet
code to understand how it works, maybe it can be leveraged to do something like this.
from svelte.
Related Issues (20)
- Leaving class attribute empty in <a> tag breaks the app
- .svelte.ts files break custom elements HOT 1
- Automatic Conversion of Multiple Snippets into an Array in Props HOT 5
- Svelte 5 next.179+: SSR regression HOT 35
- Binding through function? Functional binding? Bind transformation? Unsure which "name" would be best HOT 6
- Svelte 5: `$host()` assignment statement will be removed after compilation
- "default" is imported from external module "svelte-autosize" but never used HOT 2
- [Svelte5] Very strange behavior with a `$state()` created by a `$state.snapshot()` HOT 2
- [feat] Props data checker/converter HOT 7
- Identifier has alreay been declared error when naming a type the same as a variable in svelte5 script HOT 3
- [Svelte 5] typescript file in library folder which uses svelte/store does not generate d.ts file
- Svelte 5 next.179+: SSR regression with web components HOT 15
- Svelte 5: TypeError: Cannot read properties of undefined (reading '__className') HOT 1
- [Svelte 5] Regression in JS output - script context module variable declarations before import statements HOT 2
- [Svelte 5] Functions using `onMount` fail tests due no component initialization HOT 4
- Svelte 5: "ownership_invalid_binding" with arrays HOT 2
- [Feat] Pass a state/prop to function as getter/setter HOT 1
- [Svelte 5] False positive firefox ownership_invalid_mutation warning HOT 3
- Svelte 5: no warning/error on not-in-scope directive HOT 5
- $inspect destroying reactivity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.