From d94ad51fabf4f6fa81d5702862b86f65d82d54fd Mon Sep 17 00:00:00 2001 From: MarcMush Date: Mon, 26 Aug 2019 15:29:02 +0200 Subject: [PATCH 1/2] fix #181 --- src/passes/SyntaxHighlighter.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/passes/SyntaxHighlighter.jl b/src/passes/SyntaxHighlighter.jl index 40c17f6..01f3d72 100644 --- a/src/passes/SyntaxHighlighter.jl +++ b/src/passes/SyntaxHighlighter.jl @@ -110,7 +110,8 @@ function (highlighter::SyntaxHighlighterSettings)(crayons::Vector{Crayon}, token crayons[i-1] = cscheme.argdef crayons[i] = cscheme.argdef # :foo - elseif kind(t) == Tokens.IDENTIFIER && exactkind(prev_t) == Tokens.COLON + elseif kind(t) == Tokens.IDENTIFIER && exactkind(prev_t) == Tokens.COLON && + kind(pprev_t) ∉ (Tokens.INTEGER, Tokens.FLOAT, Tokens.IDENTIFIER, Tokens.RPAREN) crayons[i-1] = cscheme.symbol crayons[i] = cscheme.symbol # function From cb2d8412614d333277bc56949f2229080536c807 Mon Sep 17 00:00:00 2001 From: MarcMush Date: Tue, 10 Sep 2019 14:21:51 +0200 Subject: [PATCH 2/2] fix #124 - don't add closing quote after right brackets --- src/BracketInserter.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BracketInserter.jl b/src/BracketInserter.jl index 0dfc074..2ec4194 100644 --- a/src/BracketInserter.jl +++ b/src/BracketInserter.jl @@ -104,7 +104,7 @@ function insert_into_keymap!(D::Dict) if AUTOMATIC_BRACKET_MATCH[] && !eof(b) && peek(b) == v edit_move_right(buffer(s)) elseif AUTOMATIC_BRACKET_MATCH[] && - ((position(b) > 0 && leftpeek(b) in all_brackets_ws && (eof(b) || peek(b) in right_brackets_ws)) || + ((position(b) > 0 && leftpeek(b) in left_brackets_ws && (eof(b) || peek(b) in right_brackets_ws)) || ((!eof(b) && peek(b) in right_brackets_ws) || b.size == 0) && (position(b) == 0 || leftpeek(b) in left_brackets_ws)) edit_insert(buffer(s), v) edit_insert(buffer(s), v)