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

Commit 78e2584

Browse files
authored
Merge pull request #2795 from IdeaBlade/chalin-util-js-getExampleName-1114
chore(util.js): getExampleName - support optional .html suffix
2 parents 182493f + 85062c4 commit 78e2584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/resources/js/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var NgIoUtil = (function () {
7777
// TODO: use $location.path() instead(?). It seems to be empty.
7878
var loc = $location.absUrl();
7979
// E.g., https://example.com/docs/dart/latest/guide/displaying-data.html
80-
var matches = loc.match(/.*\/([\w\.\-]+)\.html/);
80+
var matches = loc.match(/.*\/([\w\-]+)(\.html)?$/);
8181
if (matches) NgIoUtil.setExampleName(matches[1]); // cache name
8282
}
8383
return NgIoUtil._exampleName;

0 commit comments

Comments
 (0)