Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
### Fixed
- Support recusrive scoped contexts.
- Various EARL report updates.
- Fixed `prependBase` to start path with a '/' for a zero length path
if there is an authority in base.

### Changed
- Better support for using a processed context for `null` and caching
Expand Down
2 changes: 1 addition & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ api.prependBase = (base, iri) => {

// append relative path to the end of the last directory from base
path = path.substr(0, path.lastIndexOf('/') + 1);
if(path.length > 0 && path.substr(-1) !== '/') {
if((path.length > 0 || base.authority) && path.substr(-1) !== '/') {
path += '/';
}
path += rel.path;
Expand Down
6 changes: 0 additions & 6 deletions tests/test-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ const TEST_TYPES = {
// NOTE: idRegex format:
//MMM-manifest#tNNN$/,
idRegex: [
// IRI resolution (PR #384)
/expand-manifest#t0129$/,

// html
/html-manifest#te001$/,
/html-manifest#te002$/,
Expand Down Expand Up @@ -182,9 +179,6 @@ const TEST_TYPES = {
// NOTE: idRegex format:
//MMM-manifest#tNNN$/,
idRegex: [
// IRI resolution (PR #384)
/toRdf-manifest#te129$/,

// well formed
/toRdf-manifest#twf05$/,

Expand Down