Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
994a3006
Commit
994a3006
authored
Oct 09, 2014
by
Arthur Schreiber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the javascript diff driver's function pattern.
parent
19fa9c0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/userdiff.h
+3
-3
tests/resources/userdiff/expected/driver/diff.javascript
+3
-3
No files found.
src/userdiff.h
View file @
994a3006
...
@@ -191,9 +191,9 @@ PATTERNS("php",
...
@@ -191,9 +191,9 @@ PATTERNS("php",
"|[-+*/<>%&^|=!]=|--|
\\
+
\\
+|<<=?|>>=?|&&|
\\
|
\\
||::|->"
),
"|[-+*/<>%&^|=!]=|--|
\\
+
\\
+|<<=?|>>=?|&&|
\\
|
\\
||::|->"
),
PATTERNS
(
"javascript"
,
PATTERNS
(
"javascript"
,
"
^[
\t
]*(function[
\t
][a-zA-Z_]
[^
\\
{]*)
\n
"
"
([a-zA-Z_$][a-zA-Z0-9_$]*(
\\
.[a-zA-Z0-9_$]+)*[
\t
]*=[
\t
]*function([
\t
][a-zA-Z_$][a-zA-Z0-9_$]*)?
[^
\\
{]*)
\n
"
"
^[
\t
]*(var[
\t
]+[a-zA-Z_][a-zA-Z0-9_]*[
\t
]*=[
\t
]*function[
\t\\
(]
[^
\\
{]*)
\n
"
"
([a-zA-Z_$][a-zA-Z0-9_$]*[
\t
]*:[
\t
]*function([
\t
][a-zA-Z_$][a-zA-Z0-9_$]*)?
[^
\\
{]*)
\n
"
"
^[
\t
]*([a-zA-Z_][a-zA-Z0-9_]*[
\t
]*:[
\t
]*function[
\t\\
(]
[^
\\
{]*)"
,
"
[^a-zA-Z0-9_
\\
$](function([
\t
][a-zA-Z_$][a-zA-Z0-9_$]*)?
[^
\\
{]*)"
,
/* -- */
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+[fFlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
"|[-+0-9.e]+[fFlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
...
...
tests/resources/userdiff/expected/driver/diff.javascript
View file @
994a3006
...
@@ -2,7 +2,7 @@ diff --git a/files/file.javascript b/files/file.javascript
...
@@ -2,7 +2,7 @@ diff --git a/files/file.javascript b/files/file.javascript
index 0965b37..5391797 100644
index 0965b37..5391797 100644
--- a/files/file.javascript
--- a/files/file.javascript
+++ b/files/file.javascript
+++ b/files/file.javascript
@@ -4,4 +4,3 @@
@@ -4,4 +4,3 @@
function(require, exports, module)
var Key = require("./key")
var Key = require("./key")
- , Direction = require("./direction")
- , Direction = require("./direction")
- , Image = require("./image");
- , Image = require("./image");
...
@@ -15,12 +15,12 @@ index 0965b37..5391797 100644
...
@@ -15,12 +15,12 @@ index 0965b37..5391797 100644
+ this.pixelX = 10;
+ this.pixelX = 10;
+ this.pixelY = 10;
+ this.pixelY = 10;
@@ -82,3 +81,3 @@
function Player(game
)
@@ -82,3 +81,3 @@
Player.prototype.moveUp = function(
)
Player.prototype.moveLeft = function() {
Player.prototype.moveLeft = function() {
- this.x -= 1;
- this.x -= 1;
+ this.x -= 5;
+ this.x -= 5;
this.direction = Direction.LEFT;
this.direction = Direction.LEFT;
@@ -106,3 +105,3 @@
function Player(game
)
@@ -106,3 +105,3 @@
Player.prototype.draw = function(context
)
- context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY - 16, 32, 48);
- context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY - 16, 32, 48);
+ context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY, 32, 48);
+ context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY, 32, 48);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment