Skip to content

Commit

Permalink
Merge pull request #1300 from Barsik-sus/willbe_rhtrn_hot_fix
Browse files Browse the repository at this point in the history
READY: (willbe): Fix incorrect slash usage in file paths for `readme_health_table_renew` command
  • Loading branch information
Wandalen authored Apr 22, 2024
2 parents 846aca6 + df1e42c commit e15a6da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/move/willbe/src/action/readme_health_table_renew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ mod private
// let path = table_parameters.base_path.
let example = if let Some( name ) = find_example_file( p.as_path(), &module_name )
{
let path = path.to_string_lossy().replace( "/", "\\" ).replace( "\\", "%2F" );
let file_name = name.split( "\\" ).last().unwrap();
let path = path.to_string_lossy().replace( '\\', "/" ).replace( "/", "%2F" );
let tmp = name.replace( '\\', "/" );
let file_name = tmp.split( '/' ).last().unwrap();
let name = file_name.strip_suffix( ".rs" ).unwrap();
format!( "[![Open in Gitpod](https://raster.shields.io/static/v1?label=&message=try&color=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE={path}%2Fexamples%2F{file_name},RUN_POSTFIX=--example%20{name}/{})", parameters.core_url )
}
Expand Down

0 comments on commit e15a6da

Please sign in to comment.