[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/jade-mode a61ad07db6 094/128: Merge pull request #42 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/jade-mode a61ad07db6 094/128: Merge pull request #42 from tjefferson08/doctype_fontification |
Date: |
Sat, 29 Jan 2022 08:24:50 -0500 (EST) |
branch: elpa/jade-mode
commit a61ad07db668f9ad23dedae17051b78fe8a43c95
Merge: 8f2959ef79 473d29b5c2
Author: Travis Jefferson <tjefferson@signpost.com>
Commit: Travis Jefferson <tjefferson@signpost.com>
Merge pull request #42 from tjefferson08/doctype_fontification
Doctype fontification
---
example.jade | 4 ++--
example.json | 3 +++
jade-mode.el | 6 ++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/example.jade b/example.jade
index dc8efa47a6..a19782edd7 100644
--- a/example.jade
+++ b/example.jade
@@ -1,4 +1,4 @@
-!!!
+doctype html
html(lang="en", class = ['classOne', 'classTwo'].join(','))
-// consult http://jade-lang.com for a full language reference
head
@@ -31,7 +31,7 @@ html(lang="en", class = ['classOne', 'classTwo'].join(','))
div.examples#javascript
- var a = 1;
- var helperFunction = function (a) { return (a === 1 ? 'singular' :
'plural'); };
- span= locals.someArray.join(', ')
+ span= someArray.join(', ')
span= a.toString() + helperFunction(a)
span#id.class(style = 'margin-bottom: 0;')=
"some_js_expression".split('_').join(' ')
#footer
diff --git a/example.json b/example.json
new file mode 100644
index 0000000000..46ddd7c7b7
--- /dev/null
+++ b/example.json
@@ -0,0 +1,3 @@
+{
+ "someArray": [ 1, "2", "three" ]
+}
diff --git a/jade-mode.el b/jade-mode.el
index 2874cd94e5..d9d78b8d82 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -81,7 +81,6 @@
(defvar jade-font-lock-keywords
`(
- ("!!!\\|doctype\\( ?[A-Za-z0-9\-\_]*\\)?" 0 font-lock-comment-face) ;;
doctype
(,jade-keywords . font-lock-keyword-face) ;; keywords
("#\\(\\w\\|_\\|-\\)*" . font-lock-variable-name-face) ;; id
("\\(?:^[ {2,}]*\\(?:[a-z0-9_:\\-]*\\)\\)?\\(#[A-Za-z0-9\-\_]*[^ ]\\)" 1
font-lock-variable-name-face) ;; id
@@ -117,7 +116,10 @@
;; highlighting under the guise of matching text for more standard
;; font-lock face application (like we do with regexps above)
(jade-highlight-js-in-parens 1 font-lock-preprocessor-face)
- (jade-highlight-js-after-tag 1 font-lock-preprocessor-face)))
+ (jade-highlight-js-after-tag 1 font-lock-preprocessor-face)
+
+ ;; doctype re-overrides some of the fontification rules
+ ("!!!\\|doctype[ ]?.*" 0 font-lock-comment-face t)))
(defun jade-highlight-js-in-parens (limit)
"Search for a tag declaration (up to LIMIT) which contains a paren
- [nongnu] elpa/jade-mode 0de371694a 053/128: Match zero or more whitespace in BOL instead of one or more., (continued)
- [nongnu] elpa/jade-mode 0de371694a 053/128: Match zero or more whitespace in BOL instead of one or more., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode c4014d8a9c 098/128: Merge pull request #50 from tjefferson08/46_unit_tests, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode e9288f66dc 106/128: use named regexes in font-lock-keywords list, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode f9522fc00a 105/128: reorder highlight tests to match regex order in jade-mode.el and display, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 97c460453b 116/128: Merge pull request #62 from robbyoconnor/remove-flymake-from-README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 93c0dec9d4 121/128: fix `.pug` extension to be auto-loaded, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 4dbde92542 122/128: Merge pull request #68 from chillum/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 1ad7c51f3c 128/128: Merge pull request #72 from he-la/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 91c2d4be67 019/128: update to include keybinding information, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode ac71830de7 096/128: [#46] add Makefile and .travis.yml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode a61ad07db6 094/128: Merge pull request #42 from tjefferson08/doctype_fontification,
ELPA Syncer <=
- [nongnu] elpa/jade-mode 5752db7c36 012/128: added significant whitespace mode as sub-mode for jade-mode and (soon to be) stylus-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 2f0f55cae4 018/128: updated readme, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 823c573c29 042/128: Merge pull request #5 from ntotani/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 97e1db63be 088/128: fix error while fontifying pipe regions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 936b4a974b 115/128: Remove flymake mentions from the README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode fd367b9489 076/128: Remove unnecessary code from README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode dfeadc97a5 069/128: Merge pull request #31 from tjefferson08/26_comment_highlight, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 6b9d9507e2 010/128: can detect simple region sexps, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode d28d1810fa 007/128: basic decrement tab working, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode cb82d16486 017/128: jade-mode depends on sws-mode, ELPA Syncer, 2022/01/29