forked from mirror/Riven
1
0
Fork 0

Update champion docs

users/mingwei/surf
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">
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://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>

View File

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

View File

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