Skip to content
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

Disable formatting in specific directories (i.e. resource/views/email) #157

Open
hmaesta opened this issue Sep 19, 2022 · 2 comments
Open

Comments

@hmaesta
Copy link

hmaesta commented Sep 19, 2022

Blade files used for Mailable shouldn't be formatted, since Markdown will understand that the spaces are code block.
This is even documented in Laravel docs.

As feature request, we should be able to define "exceptional directories" where no formatting would be applied.

For instance, I would define my resources/views/emails directory.


Example:

This file should not be formatted, otherwise everything will be understood as a code block.

resources/views/emails/order-shipped.blade.php
@component('mail::message')
# Order Shipped
 
Your order has been shipped!
 
@component('mail::button', ['url' => $url])
View Order
@endcomponent
@endcomponent
@granvilla
Copy link

up!

@onecentlin
Copy link
Owner

@hmaesta @granvilla Do you install other blade formatter extension?
Actually this extension only do a little format feature.
In my case, I also install Laravel Blade Formatter, you may try "Format Document With..." choose which you prefer to use in this case.

With Laravel Blade Snippets, the document stay the same. No extra indent

圖片
圖片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants