Comments (1)
the problem ist introduced within the block
## protect (the protector is needed to clean up the separator around the
# protected field)
postprocess_protector <- if(is.null(postprocess)){
"_"
} else {postprocess}
if(!is.null(protect)){
protect <- stringr::str_c("([", protect, "])")
infront <- stringr::str_c(postprocess_protector , "+", protect)
behind <- stringr::str_c(protect, postprocess_protector, "+")
string <- stringr::str_replace_all(string, infront, "\\1") %>%
stringr::str_replace_all(behind, "\\1")
}
It should be solved by a more logical rewrite of to_any_case
in the following way:
- preprocess & parsing (must come first)
- protect (protected symbols become cleaned, when we apply this new order, at this step only "_" must be cleaned)
- replace special characters (must come before preprocess; capital letters like Ä must be replaced via Ae)
- cases (but still with underscores around)
- (a & b) postprocess and cases:
- split every string and paste it together with the string supplied to postprocess
- prefix and postfix
from snakecase.
Related Issues (20)
- Implement a fourth parsing option tre_cooL to tre_cool HOT 1
- Make parsing_option 0 work with abbreviations again
- specify behaviour for regexps as abbreviations
- Make parsing_option 0 work with sep_in
- Description of title case in readme needs to be corrected
- Use fixed regexes when matching abbreviations
- Bugs in the abbreviations implementation
- add new stack overflow example as a test
- Make `abbreviations` argument work with case = `"none"`
- Change order of names and element in transliterations
- Readme image doesnt contain protect step
- Strange behaviour when abbreviating special characters
- Can't escape regex special character in transliterations HOT 2
- Set up auto-build pkgdown site with every commit to master
- return character(0) for input string = NULL
- abbreviations argument appears to be ignored with case="snake" HOT 2
- snakecase::to_any_case() causes warnings on 1st run due to UTF-8 characters HOT 1
- Change travis to github actions
- Leaving Middle Initials Capitalized when using title case HOT 2
- snake case with first letter uppercase HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snakecase.