Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
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
OpenEdx
ansible
Commits
b152275a
Commit
b152275a
authored
Apr 01, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test line numbers and "fix" a bug in the scalar line counting
parent
4a5b3754
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
v2/ansible/parsing/yaml/composer.py
+7
-3
v2/test/parsing/yaml/test_loader.py
+0
-0
No files found.
v2/ansible/parsing/yaml/composer.py
View file @
b152275a
...
@@ -35,8 +35,13 @@ class AnsibleComposer(Composer):
...
@@ -35,8 +35,13 @@ class AnsibleComposer(Composer):
# token's line (what about multiline strings? Perhaps we also
# token's line (what about multiline strings? Perhaps we also
# need to use previous token ended
# need to use previous token ended
node
.
__datasource__
=
self
.
name
node
.
__datasource__
=
self
.
name
node
.
__line__
=
self
.
line
+
1
node
.
__line__
=
self
.
line
node
.
__column__
=
self
.
column
+
1
# Need to investigate why this works...
if
self
.
indents
:
node
.
__column__
=
self
.
indent
+
1
else
:
node
.
__column__
=
self
.
column
+
1
elif
isinstance
(
node
,
MappingNode
):
elif
isinstance
(
node
,
MappingNode
):
node
.
__datasource__
=
self
.
name
node
.
__datasource__
=
self
.
name
...
@@ -58,4 +63,3 @@ class AnsibleComposer(Composer):
...
@@ -58,4 +63,3 @@ class AnsibleComposer(Composer):
# should be good enough to determine the error location.
# should be good enough to determine the error location.
self
.
__mapping_starts
.
append
((
self
.
line
+
1
,
self
.
column
+
1
))
self
.
__mapping_starts
.
append
((
self
.
line
+
1
,
self
.
column
+
1
))
return
Composer
.
compose_mapping_node
(
self
,
anchor
)
return
Composer
.
compose_mapping_node
(
self
,
anchor
)
v2/test/parsing/yaml/test_loader.py
View file @
b152275a
This diff is collapsed.
Click to expand it.
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