Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore(util.js): getExampleName - support optional .html suffix #2795

Merged
Merged
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: 1 addition & 1 deletion public/resources/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var NgIoUtil = (function () {
// TODO: use $location.path() instead(?). It seems to be empty.
var loc = $location.absUrl();
// E.g., https://example.com/docs/dart/latest/guide/displaying-data.html
var matches = loc.match(/.*\/([\w\.\-]+)\.html/);
var matches = loc.match(/.*\/([\w\-]+)(\.html)?$/);
if (matches) NgIoUtil.setExampleName(matches[1]); // cache name
}
return NgIoUtil._exampleName;
Expand Down