highlight escaped characters in strings
This commit is contained in:
parent
7f90df40b2
commit
9bfdcd4104
5 changed files with 27 additions and 16 deletions
|
|
@ -31,6 +31,9 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
if (typeof document == "undefined")
|
||||
return;
|
||||
|
||||
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
exports.getDocumentHead = function(doc) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@
|
|||
"start",
|
||||
["identifier","bio"],
|
||||
["text"," = "],
|
||||
["string","\"GitHub Cofounder & CEO\\nLikes tater tots and beer.\""]
|
||||
["string","\"GitHub Cofounder & CEO"],
|
||||
["constant.language.escape","\\n"],
|
||||
["string","Likes tater tots and beer.\""]
|
||||
],[
|
||||
"start",
|
||||
["identifier","dob"],
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ var Mode = function() {
|
|||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "#";
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,9 @@ var TomlHighlightRules = function() {
|
|||
|
||||
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
|
||||
|
||||
this.$rules =
|
||||
{
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
{
|
||||
token: "comment.toml",
|
||||
regex: /#.*$/
|
||||
},
|
||||
|
|
@ -81,6 +80,10 @@ var TomlHighlightRules = function() {
|
|||
regex : "\\\\$",
|
||||
next : "qqstring",
|
||||
},
|
||||
{
|
||||
token : "constant.language.escape",
|
||||
regex : '\\\\[0tnr"\\\\]'
|
||||
},
|
||||
{
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ var Mode = function() {
|
|||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue