Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation of named wildcards #557

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
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 index.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ <h3>
<p>Named wildcard accessed, for example <code>/file/javascripts/jquery.js</code>
would provide "/javascripts/jquery.js" as <code>ctx.params.file</code>:</p>

<div class="highlight highlight-js"><pre>page(<span class="pl-s1"><span class="pl-pds">'</span>/file/:file(*)<span class="pl-pds">'</span></span>, loadUser)</pre></div>
<div class="highlight highlight-js"><pre>page(<span class="pl-s1"><span class="pl-pds">'</span>/file/:file(.*)<span class="pl-pds">'</span></span>, loadUser)</pre></div>

<p>And of course <code>RegExp</code> literals, where the capture
groups are available via <code>ctx.params[N]</code> where <strong>N</strong>
Expand Down