rust-playground
                                
                                 rust-playground copied to clipboard
                                
                                    rust-playground copied to clipboard
                            
                            
                            
                        Auto selection of test cfg doesn't respect /**/ comments
this will run is test by default
/*
#[cfg(test)]
mod tests {
use crate::{Vignette, VignettePart, VignetteSet};
    #[test]
    fn test1(){
        assert_eq!(1, 1)
    }
}
*/
this with run as build by default
/*
#[cfg(test)]
mod tests {
use crate::{Vignette, VignettePart, VignetteSet};
    //#[test]
    fn test1(){
        assert_eq!(1, 1)
    }
}
*/
I'm guessing it that the playground doesn't check for comments, it just checks for something like /^\s*#[test]/
I think the detection is on a best effort basis. It's done using regex and it might affect usability a bit if it had to try to parse the code to determine if a block is commented out.
This will strip out the commits
const commitRegex = /(.*)\/\*[^(\\\*)]*\*\/(.*)/m;
function strip (input) {
  let match = input.match(commitRegex);
  while (match) {
    input = `${match[1]}${match[2]}`;
    console.log(input);
    match = input.match(commitRegex);
  }
  return(input);
};