Update champion docs

pull/5/head
Mingwei Samuel 2019-11-04 23:29:20 -08:00
parent 82a56b8c25
commit dc751ee207
3 changed files with 18 additions and 16 deletions

View File

@ -1,6 +1,6 @@
<h1 align="center"> <h1 align="center">
Riven<br> Riven<br>
<img src="https://cdn.communitydragon.org/latest/champion/Riven/square" width="20" height="20" alt="Riven icon"> <a href="https://github.com/MingweiSamuel/Riven/"><img src="https://cdn.communitydragon.org/latest/champion/Riven/square" width="20" height="20" alt="Riven Github"></a>
<a href="https://crates.io/crates/riven"><img src="https://img.shields.io/crates/v/riven?style=flat-square&logo=rust" alt="Crates.io"></a> <a href="https://crates.io/crates/riven"><img src="https://img.shields.io/crates/v/riven?style=flat-square&logo=rust" alt="Crates.io"></a>
<a href="https://docs.rs/riven/"><img src="https://img.shields.io/badge/docs.rs-Riven-blue?style=flat-square&logo=read-the-docs&logoColor=white" alt="Docs.rs"></a> <a href="https://docs.rs/riven/"><img src="https://img.shields.io/badge/docs.rs-Riven-blue?style=flat-square&logo=read-the-docs&logoColor=white" alt="Docs.rs"></a>
<a href="https://travis-ci.com/MingweiSamuel/Riven"><img src="https://img.shields.io/travis/com/mingweisamuel/riven?style=flat-square" alt="Travis CI"></a> <a href="https://travis-ci.com/MingweiSamuel/Riven"><img src="https://img.shields.io/travis/com/mingweisamuel/riven?style=flat-square" alt="Travis CI"></a>

View File

@ -331,17 +331,18 @@ impl Champion {
/// ///
/// This is generally the `en_US` name with spaces and punctuation removed, /// This is generally the `en_US` name with spaces and punctuation removed,
/// but there are the following exceptions: /// but there are the following exceptions:
/// | Name | Identifier | ///
/// |------|------------| /// Variant | Name | Identifier
/// | None | `"NONE"` (placeholder value) | /// --------|------|-----------
/// | Cho'Gath | "Chogath" | /// `None` | "NONE" | "NONE"
/// | Fiddlesticks | "FiddleSticks" | /// `ChoGath` | "Cho'Gath" | "Chogath"
/// | Kai'Sa | "Kaisa" | /// `Fiddlesticks` | "Fiddlesticks" | "FiddleSticks"
/// | Kha'Zix | "Khazix" | /// `KaiSa` | "Kai'Sa" | "Kaisa"
/// | LeBlanc | "Leblanc" | /// `KhaZix` | "Kha'Zix" | "Khazix"
/// | Nunu & Willump | "Nunu" | /// `LeBlanc` | "LeBlanc" | "Leblanc"
/// | Vel'Koz | "Velkoz" | /// `NunuWillump` | "Nunu & Willump" | "Nunu"
/// | Wukong | "MonkeyKing" | /// `VelKoz` | "Vel'Koz" | "Velkoz"
/// `Wukong` | "Wukong" | "MonkeyKing"
pub fn identifier(self) -> &'static str { pub fn identifier(self) -> &'static str {
match self { match self {
Self::None => "NONE", Self::None => "NONE",

View File

@ -55,14 +55,15 @@ impl Champion {
/// ///
/// This is generally the `en_US` name with spaces and punctuation removed, /// This is generally the `en_US` name with spaces and punctuation removed,
/// but there are the following exceptions: /// but there are the following exceptions:
/// | Name | Identifier | ///
/// |------|------------| /// Variant | Name | Identifier
/// | None | `"NONE"` (placeholder value) | /// --------|------|-----------
/// `None` | "NONE" | "NONE"
{{ {{
for (let { name, alias } of champions) { for (let { name, alias } of champions) {
if (name.replace(/[^a-zA-Z0-9]+/, '') !== alias) { if (name.replace(/[^a-zA-Z0-9]+/, '') !== alias) {
}} }}
/// | {{= name }} | "{{= alias }}" | /// `{{= enumName(name) }}` | "{{= name }}" | "{{= alias }}"
{{ {{
} }
} }