[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/web-mode d377a2b873: element highlight fix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/web-mode d377a2b873: element highlight fix |
Date: |
Sun, 25 Dec 2022 12:59:52 -0500 (EST) |
branch: elpa/web-mode
commit d377a2b873661d0e4d8b378948839543b2e33a55
Author: fxbois <fxbois@gmail.com>
Commit: fxbois <fxbois@gmail.com>
element highlight fix
#1257
---
issues/1230.twig | 10 ++++++++++
issues/1255.jsx | 29 +++++++++++++++++++++++++++++
issues/1257.html | 10 ++++++++++
web-mode.el | 1 +
4 files changed, 50 insertions(+)
diff --git a/issues/1230.twig b/issues/1230.twig
new file mode 100644
index 0000000000..111fe62b46
--- /dev/null
+++ b/issues/1230.twig
@@ -0,0 +1,10 @@
+<script>
+ {% if condition %}
+ console.log('Current indentation');
+ {% endif %}
+</script>
+<div>
+ {% if condition %}
+ hello
+ {% endif %}
+</div>
diff --git a/issues/1255.jsx b/issues/1255.jsx
new file mode 100644
index 0000000000..07747f4102
--- /dev/null
+++ b/issues/1255.jsx
@@ -0,0 +1,29 @@
+function x() {
+ const good = (
+ <div
+ attr={3}
+ otherattr={5}>
+ wat
+ </div>
+ );
+ const bad = (
+ <CustomComponent
+ attr={5}
+ otherattr={3}
+ />
+ );
+ const badish = (
+ <CustomComponent with
+ multiple attributes
+ per line somehow
+ works
+ until
+ you
+ include
+ an={sign}
+ and then it's
+ back to unindented until
+ you have another multi-attr line
+ />
+ );
+}
diff --git a/issues/1257.html b/issues/1257.html
new file mode 100644
index 0000000000..6e3d946df0
--- /dev/null
+++ b/issues/1257.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+ <head>
+ <title>hello world</title>
+ <meta charset="utf-8" />
+ </head>
+ <body>
+ lorem
+ </body>
+</html>
diff --git a/web-mode.el b/web-mode.el
index 99a3e5b5b6..825f398290 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -7962,6 +7962,7 @@ Also return non-nil if it is the command
`self-insert-command' is remapped to."
(web-mode-make-tag-overlays)
(setq len (length (get-text-property (caar ctx) 'tag-name)))
(move-overlay web-mode-overlay-tag-start (+ (caar ctx) 1) (+ (caar ctx)
1 len))
+ (move-overlay web-mode-overlay-tag-end (+ (cadr ctx) 1) (+ (cadr ctx) 1
len)) ;; #1257
)
(t
(web-mode-make-tag-overlays)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/web-mode d377a2b873: element highlight fix,
ELPA Syncer <=