Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/pyld/iri_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ def remove_dot_segments_of_path(iri: str, colon_position: int) -> str:


def resolve(relative_iri: str, base_iri: str = None) -> str:
# """
# Resolves a given relative IRI to an absolute IRI.
"""
Resolves a given relative IRI to an absolute IRI.

# :param base_iri: the base IRI.
# :param relative_iri: the relative IRI.
:param base_iri: the base IRI.
:param relative_iri: the relative IRI.

# :return: the absolute IRI.
# """
:return: the absolute IRI.
"""
base_iri = base_iri or ''
base_fragment_pos = base_iri.find("#")

Expand Down Expand Up @@ -289,7 +289,7 @@ def unresolve(absolute_iri: str, base_iri: str = ""):
rval = './' + rval

# build relative IRI using urlunparse with empty scheme/netloc
return urlunparse(('', '', rval, '', rel.query or '', rel.fragment or '')) or './'
return urlunparse(('', '', rval, '', rel.query, rel.fragment)) or './'


def parse_authority(parsed_iri: ParseResult) -> str:
Expand Down
Loading
Loading