Skip to content

html: script*: remove following newline #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2021

Conversation

nbfalcon
Copy link
Contributor

@nbfalcon nbfalcon commented May 28, 2021

Expanding script| in an html file would leave a newline after the
expansion, which I found to be rather annoying. This behaviour is not
present with divs and other snippets.

Previously, script (both scriptsrc and regular script) worked like this:

<div>
  Some text...
</div>
script| <!-- Cursor here, I want to add a script tag -> TAB -->
<div>
  Some more text...
</div>
<!-- yields -->
<div>
  Some text...
</div>
<script type="text/javascript">
  | <!-- cursor here -->
</script>

<div>
  Some more text... <!-- note the annoying newline above -->
</div>

Now, the behaviour is as follows:

<div>
  Some text...
</div>
script| <!-- Cursor here, I want to add a script tag -> TAB -->
<div>
  Some more text...
</div>
<!-- yields -->
<div>
  Some text...
</div>
<script type="text/javascript">
  | <!-- cursor here -->
</script>
<div>
  Some more text... <!-- note: no annoying newline above -->
</div>

Expanding script| in an html file would leave a newline after the
expansion, which I found to be rather annoying. This behaviour is not
present with divs and other snippets.
@hlissner hlissner added is:feature Adds or requests new features, or extends existing ones mode:html labels May 28, 2021
@hlissner hlissner merged commit bc613f4 into doomemacs:master May 28, 2021
@hlissner
Copy link
Member

Makes sense to me. Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:feature Adds or requests new features, or extends existing ones mode:html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants