-
Notifications
You must be signed in to change notification settings - Fork 2
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
'$' breaks replacement in page when running the CLI #5
Comments
testing note: when using torchlight-cli on javascript code |
Thanks for the reply. Are there any know caveats with mdx? I'm getting the issue in Astro with mdx. |
Here's the output html it's running against: <pre><code class="language-php">use Filament\Forms\Components\TextInput;
TextInput::make('cost')->mask(fn (TextInput\Mask $mask) => $mask->money(prefix: '$', thousandsSeparator: ',', decimalPlaces: 2))
</code></pre>
<p>You can also control whether the number is signed or not. While the default is to allow both negative and positive numbers, <code>isSigned: false</code> allows only positive numbers:</p>
<pre><code class="language-php">use Filament\Forms\Components\TextInput;
TextInput::make('cost')->mask(fn (TextInput\Mask $mask) => $mask->money(prefix: '$', thousandsSeparator: ',', decimalPlaces: 2, isSigned: false))
</code></pre>
<h3 id="datalists">Datalists</h3>
<p>You may specify <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist">datalist</a> options for a text input using the <code>datalist()</code> method:</p>
<pre><code class="language-php">TextInput::make('manufacturer')
->datalist([
'BWM',
'Ford',
'Mercedes-Benz',
'Porsche',
'Toyota',
'Tesla',
'Volkswagen',
])
</code></pre> |
Hey again @awcodes. Just to confirm, are you providing torchlight-cli an html file (output from astro), or mdx? If you are providing it mdx, the remark-torchlight package might be better. I am still testing this myself, but here is what I've learned so far. Maybe something will be useful:
Sorry I don't have a better answer yet, but I will let you know as soon as I test this remark-mdx plugin. Within the next few days. |
Yea. I'm running it after the build against the dist html files. Also ran into the same issue you did with nextjs. |
Also just kinda want to run it after the build so it's not possibly getting throttled during dev with hmr, etc. Thanks for taking the time to help though. |
+1 on this is anyone can find a solution. |
For clarification, it's not |
When having code blocks that have '$' in them the CLI run breaks and causes unexpected output in the html file.
The text was updated successfully, but these errors were encountered: