Skip to content

Commit d07f2ab

Browse files
Fix BAAPB resolver implementation
1 parent 79ca4d5 commit d07f2ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
from mmif.serialize.annotation import Text
22
from flask import current_app
33
import cache
4+
import mmif_docloc_baapb
45

56

67
def url2posix(path):
78
"""For the visualizer we often want a POSIX path and not a URL so we strip off
89
the protocol if there is one."""
910
if str(path).startswith('file:///'):
1011
path = path[7:]
12+
elif str(path).startswith('baapb://'):
13+
path = mmif_docloc_baapb.resolve(path)
1114
return path
1215

1316

0 commit comments

Comments
 (0)