我喜欢在Atom中定制JS Beautify以更好地格式化我的blade文件。
我们的手册样式如下:
{{--
Template Name: Full Width Template
--}}
<!-- template-fullwidth -->
@extends('layouts.app')
@section('content')
@while(have_posts())
@php the_post() @endphp
@include('sections.content-page')
@endwhile
@endsection
JS Beautify给我们的是:
{{-- Template Name: Full Width Template
--}}
<!-- template-fullwidth -->
@extends('layouts.app')
@section('content')
@while(have_posts())
@php the_post()
@endphp
@include('sections.content-page')
@endwhile
@endsection
我尝试过配置.jsbeauthorityrc文件,但是没有成功。
-
保留注释行
-
在select指令前添加空行[@extends,@section]
-
@section指令中的缩进行
-
在@while和@if中缩进项
-
保持@php代码和@endphp在一行
或者失败了所有这些都有某种可读的、格式良好的代码,而不仅仅是一长串指令。
这能做到吗?