We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to concat "hello " and "world" in a single line, the minimal reproduce is here:
"hello "
"world"
#[test] fn reproduce() { let mut hello_map = SourceMap::new("/"); let hello = hello_map.add_source("hello.txt"); hello_map.set_source_content(hello as usize, "hello "); hello_map.add_mapping( 0, 0, Some(parcel_sourcemap::OriginalLocation { original_line: 0, original_column: 0, source: hello, name: None, }), ); let mut world_map = SourceMap::new("/"); let world = world_map.add_source("world.txt"); world_map.set_source_content(world as usize, "world"); world_map.add_mapping( 0, 0, Some(parcel_sourcemap::OriginalLocation { original_line: 0, original_column: 0, source: world, name: None, }), ); let mut hello_world_map = SourceMap::new("/"); hello_world_map.add_sourcemap(&mut hello_map, 0); hello_world_map.add_sourcemap(&mut world_map, 0); println!("{}", hello_world_map.to_json(None).unwrap()); // {"version":3,"sourceRoot":null,"mappings":"ACAA","sources":["hello.txt","world.txt"],"sourcesContent":["hello ","world"],"names":[]} }
generated map: {"version":3,"sourceRoot":null,"mappings":"ACAA","sources":["hello.txt","world.txt"],"sourcesContent":["hello ","world"],"names":[]} }. generated string: hello world.
{"version":3,"sourceRoot":null,"mappings":"ACAA","sources":["hello.txt","world.txt"],"sourcesContent":["hello ","world"],"names":[]} }
hello world
"hello " will loose the mapping, "world" will map to "hello world".
"hello world"
playground link: https://evanw.github.io/source-map-visualization/#MTEAaGVsbG8gd29ybGQxMzIAeyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjpudWxsLCJtYXBwaW5ncyI6IkFDQUEiLCJzb3VyY2VzIjpbImhlbGxvLnR4dCIsIndvcmxkLnR4dCJdLCJzb3VyY2VzQ29udGVudCI6WyJoZWxsbyAiLCJ3b3JsZCJdLCJuYW1lcyI6W119
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to concat
"hello "
and"world"
in a single line, the minimal reproduce is here:generated map:
{"version":3,"sourceRoot":null,"mappings":"ACAA","sources":["hello.txt","world.txt"],"sourcesContent":["hello ","world"],"names":[]} }
.generated string:
hello world
."hello "
will loose the mapping,"world"
will map to"hello world"
.playground link: https://evanw.github.io/source-map-visualization/#MTEAaGVsbG8gd29ybGQxMzIAeyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjpudWxsLCJtYXBwaW5ncyI6IkFDQUEiLCJzb3VyY2VzIjpbImhlbGxvLnR4dCIsIndvcmxkLnR4dCJdLCJzb3VyY2VzQ29udGVudCI6WyJoZWxsbyAiLCJ3b3JsZCJdLCJuYW1lcyI6W119
The text was updated successfully, but these errors were encountered: