I know this issue too. Try not to intend your section content and remove white-space at line endings.
@section('div-id')
test_id
@stop
@section('content')
@lang('texts.test')
@stop
Thank you for you quick answer, it works for the first white-space (not always though), but not for the second. I checked and I have no white-spaces or tabs at the end of my lines. If I remove the CR LF, it's not working at all (it appears there need to be a line break before the @stop command).
Result with your input is:
<div id="test_id ">
<p> test </p>
</div>
I don't know why it doesn't fix the first white-space of the 'content' section tho.
Another solution: totally forgot about this ^^
@section('title', 'value')
Result
<title>value</title>
Example: http://alexwenzel.de/2014/223/line-breaks-in-blade-sections-and-yields
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community