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

Commit ea45782

Browse files
chalinkwalrath
authored andcommitted
docs(router): fix markdown, and example mixin cleanup (#2101)
* docs(router): fix markdown and example mixin cleanup - Fixed: markdown text not under `:marked` region (and so that text was not showing up in the generated html). - Fixed: code excerpt title `constructor` -> `isSelected`. - Cleanup of all makeExample mixin uses. This cleanup will help make it easier to record differences with the deprecated router chapter (which must have app-relative makeExample paths). * post-review updates Found another instance of markdown (a heading) outside of a `:marked` region.
1 parent a771a6e commit ea45782

File tree

2 files changed

+231
-109
lines changed

2 files changed

+231
-109
lines changed

public/_includes/_util-fns.jade

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ mixin makeExample(_filePath, region, _title, stylePatterns)
9898
//- ending is given or is just (), then the title will be suffixed with
9999
//- either "(excerpt)", or "(#{_region})" when _region is defined.
100100
mixin makeExcerpt(_filePath, _region, _title, stylePatterns)
101-
- var matches = _filePath.match(/(.*)\s+\(([\w ]*)\)$/);
101+
- var matches = _filePath.match(/(.*)\s+\(([^\)]*)\)$/);
102102
- var parenText;
103103
- if (matches) { _filePath = matches[1]; parenText = matches[2]; }
104104
- var adjustments = adjustExamplePathAndTitle({filePath:_filePath, title:_title});
105105
- var filePath = adjustments.filePath;
106106
- var title = adjustments.title;
107-
- var region = _region || parenText;
108-
- var excerpt = !region || parenText === '' ? 'excerpt' : parenText || region;
107+
- var region = _region || (_region === '' ? '' : parenText);
108+
- var excerpt = parenText || region || 'excerpt';
109109
- if (title) title = title + ' (' + excerpt + ')';
110110
+makeExample(filePath, region, title, stylePatterns)(format='.')
111111

0 commit comments

Comments
 (0)