Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nkallen/pseudw
Browse files Browse the repository at this point in the history
Conflicts:
	.gitmodules
	lib/annotated_edition.coffee
	test/annotated_edition.coffee
	vendor/canonical
  • Loading branch information
nkallen committed Sep 6, 2013
2 parents dadab57 + 03dcaaa commit cf9dfd1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/annotated_edition.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ class AnnotatedEdition
element = document.createElement('annotation', annotation.form)
element.annotation = annotation
parent.appendChild(element) if parent
<<<<<<< HEAD:lib/annotated_edition.coffee
null # no accumulator, since text nodes have no children
=======
null # no accumulator, as text nodes have no children
>>>>>>> 03dcaaafb7bad329e876e35d83efa21362b0ff09:lib/annotated_edition.coffee
else
attributes = {}
for attr in child.attrs()
Expand Down
1 change: 1 addition & 0 deletions lib/annotator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class TreebankAnnotator extends Annotator

annotation = @treebank[@i]
form = annotation.originalForm || annotation.form
console.log(string[0...form.length], form)
return [null, string] if (original = string[0...form.length]) != form
@skip()
remainder = string[form.length..]
Expand Down
10 changes: 10 additions & 0 deletions test/annotated_edition.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ describe 'AnnotatedEdition', ->
citationMapping = [{label: 'book'}, {label: 'line'}]
annotator = new annotator.SimpleAnnotator

<<<<<<< HEAD
it 'selects a passage with a coarse selector', ->
annotatedEdition = AnnotatedEdition.make(citationMapping, '2', annotator, document)
annotatedEdition.find('l')[0].path().should.eql("/TEI.2/text/body/div[2]/p[1]/l[1]")

xit 'selects a passage with a fine selector', -> # doesn't work because <l> tags don't have n='' at the moment.
=======
# These are broken because the new vendorized XML has div1s and milestones!

xit 'selects a passage with a coarse selector', ->
annotatedEdition = AnnotatedEdition.make(citationMapping, '2', annotator, document)
annotatedEdition.find('l')[0].path().should.eql("/TEI.2/text/body/div[2]/p[1]/l[1]")

xit 'selects a passage with a fine selector', ->
>>>>>>> 03dcaaafb7bad329e876e35d83efa21362b0ff09
annotatedEdition = AnnotatedEdition.make(citationMapping, '2.2', annotator, document)
annotatedEdition.path().should.eql("/TEI.2/text/body/div[2]/p[1]/l[2]")

0 comments on commit cf9dfd1

Please sign in to comment.