-
Notifications
You must be signed in to change notification settings - Fork 28
fix: handle mid-position mixin correctly (#19) #21
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
base: master
Are you sure you want to change the base?
Conversation
Changed regex from (?:\\s+\\.\\.\\.)?$ to \\s+\\.\\.\\. so spread attributes are recognized even when followed by other attributes. Prevents mixins from being ignored and keeps template behavior consistent.
|
import { join } from 'path'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { visualizer } from 'rollup-plugin-visualizer'; | ||
import { createRequire } from 'module'; |
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.
Do we need this? Suspect we may not; would be great if we could keep using modern ES modules only, instead of the old require
stuff.
import { isObservable, isPromise } from "../types/futures" | ||
import { isRMLEventListener } from "../types/event-listener"; | ||
import { toListener } from "../utils/to-listener"; | ||
import { DatasetItemPreSink } from "../sinks/dataset-sink"; |
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.
👍
/** | ||
* Fix: Resolve mixin position dependency issue | ||
* | ||
* Problem: The regex pattern `(?:\s+\.\.\.)?$` made the spread operator detection optional and |
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.
(?:\s+\.\.\.)?
That spread "operator" is meant to be an optional piece of syntactic sugar and we'd rather keep it optional, as some people may not like it...
Hi @NtohnwiBih how are you getting on? We're nearly there... can you just fix that little thing above, please, so we can merge this change? If something's not clear, please shout! |
I am so sorry, I have issues with my laptop but I will get to it soon as I
get it fixed
…On Fri, Oct 3, 2025, 2:53 PM D++ ***@***.***> wrote:
*dariomannu* left a comment (ReactiveHTML/rimmel#21)
<#21 (comment)>
Hi @NtohnwiBih <https://github.com/NtohnwiBih> how are you getting on?
We're nearly there... can you just fix that little thing above, please, so
we can merge this change? If something's not clear, please shout!
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAOXZWO53CXWSCTPRI7TVD3VZ5VHAVCNFSM6AAAAACHDPQY3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRVG43DMMRXHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description:
This pull request fixies an issue where mixins using the spread operator (...) were ignored when followed by other interpolated attributes in templates.
Problem:
The regex pattern (?:\s+...)?$ made the spread operator detection optional and required it to be at the end of the accumulated string. As a result, mixins were ignored in cases like:
<button ...${Red()} onclick="${count}"> <!-- Red() mixin was ignored -->
Solution:
The regex has been updated to \s+... (non-optional), ensuring the spread syntax is properly detected during parsing regardless of subsequent attributes.
Impact:
Related Issue: #19