Skip to content

PHP dictionary indentation is incorrect when "indent-tabs-mode" is true #1319

Open
@DougBeney

Description

@DougBeney

Hello! Thank you for such an amazing Emacs package! Just running into this issue.

Here is correct and expected indentation. This already happens when Emacs' indent-tabs-mode is nil. Paste this into a web-mode buffer, select the text, and press tab to format and the result will remain the same.

<?php
$bob = [
    "name" => 'value',
    "other" => 'value2'
]

Now, select that text, M-x tabify, select the text again, and press tab to run indent-for-tab-command, and you will get this result:

<?php
$bob = [
	"name" => 'value',
		"other" => 'value2'
]

As you can see, there are two tabs on the "other" key's line.

web-mode Version: 20241227.530

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions