question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML format for Laravel Blade

See original GitHub issue
  • Mac OS Sierra:
  • 1.19:
  • 1.1.1:

When you format Laravel Blade files you get the following results. Can we have the plugin ignore (leave as white space) laravel blade tags (@extends @section @stop)? There are more laravel tags.

Maybe it already does this and i just don’t know how to set it up.

VS Code settings:

    "beautify.language": {
        "js": {
            "type": [
                "javascript",
                "json"
            ],
            "filename": [
                ".jshintrc",
                ".jsbeautifyrc"
            ]
            // "ext": ["js", "json"]
            // ^^ to set extensions to be beautified using the javascript beautifier
        },
        "css": [
            "css",
            "scss"
        ],
        "html": [
            "htm",
            "html",
            "blade.php"
        ]
    },
    "html.format.endWithNewline": true,
    "html.format.maxPreserveNewLines": 1,
    "html.format.indentHandlebars": true,
    "html.format.preserveNewLines": true,
    "html.format.wrapLineLength": 0    

Expected results

@extends('layouts.book') 

@section('hero-image')
<img src="" alt="" class="img-fluid">
@stop 

Actual results

@extends('layouts.book') @section('hero-image')
<img src="" alt="" class="img-fluid"> @stop @section('content')

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brnpimentelcommented, Jan 7, 2018

Im using this mod for jsbeautify

0reactions
HookyQRcommented, Jan 25, 2018

Not related to this extension. See the upstream js-beautify project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blade Templates - The PHP Framework For Web Artisans
Blade template files use the .blade.php file extension and are typically ... By default, Blade (and the Laravel e helper) will double encode...
Read more >
Displaying HTML with Blade shows the HTML code
In Laravel Blade template, {{ }} wil escape html. If you want to display html from controller in view, decode html from string....
Read more >
How To Display HTML Tags In Blade With Laravel 8 - DevDojo
Display HTML In Laravel Blade Views. First, you need to make sure your file uses the .blade.php file extension and is located in...
Read more >
How to convert HTML to Laravel blade - Front-End in Laravel
How to convert HTML template to Laravel project in 5 simple steps. Copy all .html files to Your Laravel Project Folder > Resources...
Read more >
Laravel Blade formatter - Visual Studio Marketplace
Blade Formatter: format Custom Html Attributes Order, Comma separated custom HTML attributes order. e.g. id, data-.+, class, name . To enable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found