mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-22 18:16:30 +00:00
Define make_fqn()
This commit is contained in:
parent
ce89faef84
commit
8afcc1511e
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
use activitystreams::iri_string::percent_encode::PercentEncodedForIri;
|
||||
use heck::ToUpperCamelCase;
|
||||
use openssl::rand::rand_bytes;
|
||||
use pulldown_cmark::{html, CodeBlockKind, CowStr, Event, LinkType, Options, Parser, Tag};
|
||||
use regex_syntax::is_word_character;
|
||||
|
@ -24,6 +25,13 @@ pub fn iri_percent_encode_seg(segment: &str) -> String {
|
|||
PercentEncodedForIri::from_path_segment(segment).to_string()
|
||||
}
|
||||
|
||||
pub fn make_fqn(name: &str) -> String {
|
||||
name.to_upper_camel_case()
|
||||
.chars()
|
||||
.filter(|c| c.is_alphanumeric())
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum State {
|
||||
Mention,
|
||||
|
|
Loading…
Reference in a new issue