[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/web-mode 53bed1e6a8: i18n elements
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/web-mode 53bed1e6a8: i18n elements |
Date: |
Sun, 25 Dec 2022 16:59:41 -0500 (EST) |
branch: elpa/web-mode
commit 53bed1e6a8554da877c27ffad6bd65113dc758e3
Author: fxbois <fxbois@gmail.com>
Commit: fxbois <fxbois@gmail.com>
i18n elements
#1178
---
issues/1178.html | 13 +++++++++++++
web-mode.el | 5 ++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/issues/1178.html b/issues/1178.html
new file mode 100644
index 0000000000..4ecf6ccfd7
--- /dev/null
+++ b/issues/1178.html
@@ -0,0 +1,13 @@
+<div>
+ hello
+</div>
+<i18n>
+ {
+ "en": {
+ "hello": "hello world!"
+ },
+ "ja": {
+ "hello": "こんにちは、世界!"
+ }
+ }
+</i18n>
diff --git a/web-mode.el b/web-mode.el
index 3601e6edde..a65ef4de10 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -4131,7 +4131,7 @@ Also return non-nil if it is the command
`self-insert-command' is remapped to."
(web-mode-sf tagclose)
(setq part-end (match-beginning 0))
(> part-end part-beg))
- ;;(message "end=%S" (point))
+ ;;(message "tagopen=%S tagclose=%S end=%S" tagopen tagclose
(point))
(put-text-property part-beg part-end
'part-side
(cond
@@ -5550,6 +5550,9 @@ Also return non-nil if it is the command
`self-insert-command' is remapped to."
) ;cond
) ;let
) ;script
+ ((string= tname "i18n")
+ (setq element-content-type "javascript"
+ part-close-tag "</i18n>"))
((and (string= tname "template") (string-match-p " lang"
(buffer-substring-no-properties tbeg tend)))
(let (template)
(setq template (buffer-substring-no-properties tbeg tend)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/web-mode 53bed1e6a8: i18n elements,
ELPA Syncer <=