-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docs : Fix - Add and handle Regex replacing logics and add regex for … #3372
base: master
Are you sure you want to change the base?
Conversation
…numbers I added a an abilitity to jsx converter, for replacing with the Regex patterns. In another hand, you can use youre desired Regex patterns after now for converting desired text parts to the desired replacement.
src/docs/src/lib/actions.svelte.js
Outdated
@@ -56,10 +62,18 @@ export function htmlToJsx(node) { | |||
) | |||
|
|||
function update() { | |||
node.innerHTML = originalContent.replace( | |||
originalContent = originalContent.replace( |
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.
originalContent is const. can not be re-assigned.
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.
Also, value="10"
is not turning to value={10}
with this PR. Am I missing something?
The originalContent is constant, so i use an alternative variable as JSXContent to work on content with replacers.
@saadeghi Thank you to support ❤️! |
Yeah... But is your code working? |
@saadeghi I tested as logics added and test passed. But you can test it in your whole project as daysiUI owner ! 🔥 |
@saadeghi waiting for your reaction... |
…numbers
I added a an abilitity to jsx converter, for replacing with the Regex patterns. In another hand, you can use youre desired Regex patterns after now for converting desired text parts to the desired replacement.
e.g. I added an example for number convertion
Will be such as below