0

The following is valid HTML.

<p><a href="page1.html">Page one</a>
<p><a href="page2.html">Page two</a>
<p><a href="page3.html">Page three</a>

And yet web-mode (even with (setq web-mode-enable-optional-tags t) set) still decides that it should be indented as:

<p><a href="page1.html">Page one</a>
    <p><a href="page2.html">Page two</a>
        <p><a href="page3.html">Page three</a>

Which is very undesirable as I edit many HTML files and have stuck to the convention of never closing <p> tags. I simply can't use the autoindenting facilities of web-mode which makes me sad as web-mode is touted as the emacs HTML editing mode.

Is there any way that I can make the indenter just ignore the <p> tags? I can't think of a single situation where I would want the content of <p> tags to be indented.

  • Are you sure you aren't using an outdated version of web-mode? – DoMiNeLa10 Apr 19 '18 at 15:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.