Open edward-burn opened 3 weeks ago
styler::style_text("Martí Català Sabaté")
#> Error in `parse_safely()`:
#> ! <text>:1:7: unexpected symbol
#> 1: Martí Català
#> ^
#> Backtrace:
#> ▆
#> 1. ├─styler::style_text("Martí Català Sabaté")
#> 2. │ └─styler (local) transformer(text)
#> 3. │ └─... %>% ...
#> 4. ├─purrr::when(...)
#> 5. ├─styler:::parse_transform_serialize_r(...)
#> 6. │ └─styler::compute_parse_data_nested(text, transformers, more_specs)
#> 7. │ └─styler:::text_to_flat_pd(text, transformers, more_specs = more_specs)
#> 8. │ ├─... %>% drop_cached_children()
#> 9. │ └─styler:::tokenize(text)
#> 10. │ ├─... %>% enhance_mapping_special()
#> 11. │ └─styler:::get_parse_data(text, include_text = TRUE)
#> 12. │ └─styler:::parse_safely(text, keep.source = TRUE)
#> 13. │ └─rlang::abort(tried_parsing$message)
#> 14. ├─styler:::drop_cached_children(.)
#> 15. │ └─base::order(pd$line1, pd$col1, -pd$line2, -pd$col2, as.integer(pd$terminal))
#> 16. ├─styler:::add_attributes_caching(., transformers, more_specs = more_specs)
#> 17. │ └─base::nrow(pd_flat)
#> 18. ├─styler:::add_stylerignore(.)
#> 19. │ └─base::trimws(pd_flat$text)
#> 20. │ ├─base (local) mysub(...)
#> 21. │ │ └─base::sub(re, "", x, perl = TRUE)
#> 22. │ │ └─base::is.factor(x)
#> 23. │ └─base (local) mysub(paste0("^", whitespace, "+"), x)
#> 24. │ └─base::sub(re, "", x, perl = TRUE)
#> 25. │ └─base::is.factor(x)
#> 26. ├─styler:::add_terminal_token_after(.)
#> 27. │ └─pd_flat %>% filter(terminal) %>% arrange_pos_id()
#> 28. ├─styler:::arrange_pos_id(.)
#> 29. ├─styler:::filter(., terminal)
#> 30. │ └─base::subset(.data, ...)
#> 31. ├─styler:::add_terminal_token_before(.)
#> 32. │ └─pd_flat %>% filter(terminal) %>% arrange_pos_id()
#> 33. ├─styler:::arrange_pos_id(.)
#> 34. ├─styler:::filter(., terminal)
#> 35. │ └─base::subset(.data, ...)
#> 36. ├─styler:::enhance_mapping_special(.)
#> 37. └─styler:::ensure_correct_txt(., text)
#> 38. └─styler:::is_insufficiently_parsed_string(pd)
#> 39. └─base::grepl("^\\[", pd$text)
#> 40. └─base::is.factor(x)
Created on 2024-09-23 with reprex v2.0.2
hi @edward-burn can you try again with the current version?, this should be fixed with the selects server side
is this now solved @edward-burn ?