Merge pull request #2635 from rtfeldman/issues-2607/multiline-input-repl

Allow multi string in RePL
This commit is contained in:
Brian Carroll 2022-03-04 07:40:17 +00:00 committed by GitHub
commit 485cbb4bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 8 deletions

View File

@ -55,7 +55,6 @@ impl<'a> Buf<'a> {
pub fn push_str_allow_spaces(&mut self, s: &str) {
debug_assert!(!self.beginning_of_line);
debug_assert!(!s.contains('\n'));
self.flush_spaces();

View File

@ -519,11 +519,11 @@ fn four_element_record() {
);
}
// #[test]
// fn multiline_string() {
// // If a string contains newlines, format it as a multiline string in the output
// expect_success(r#""\n\nhi!\n\n""#, "\"\"\"\n\nhi!\n\n\"\"\"");
// }
#[test]
fn multiline_string() {
// If a string contains newlines, format it as a multiline string in the output
expect_success(r#""\n\nhi!\n\n""#, "\"\n\nhi!\n\n\" : Str");
}
#[test]
fn list_of_3_field_records() {

View File

@ -65,7 +65,7 @@ section.source {
flex-direction: column;
}
section.source input {
section.source textarea {
height: 32px;
padding: 8px;
margin-bottom: 16px;

View File

@ -20,7 +20,7 @@
</section>
<section class="source">
<input autofocus id="source-input" class="code" placeholder="Type some Roc code and press Enter" />
<textarea autofocus id="source-input" class="code" placeholder="Type some Roc code and press Enter"></textarea>
</section>
</div>
<script type="module" src="/repl.js"></script>