Skip to content
New issue

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

Apostrophe should not always cause step to return CharClass::InWord #244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lang/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl CharClass {
}
'(' | '[' | '{' => Self::NewSubclause,
')' | ']' | '}' => self,
'"' | '”' | '“' | '»' | '›' | '«' | '‹' | '‘' => self,
'"' | '”' | '“' | '»' | '›' | '«' | '‹' | '‘' | '\'' => self,
',' | ';' => {
if self.is_in_word() {
Self::MaybeSubclause
Expand Down Expand Up @@ -913,6 +913,10 @@ mod tests {
let title =
case.transform("Around a table: the reason why we just could not care");
assert_eq!("Around a Table: The Reason Why We Just Could Not Care", title);

let title =
case.transform("'My colleague is a robot' – exploring frontline employees' willingness to work with collaborative service robots");
assert_eq!("'My Colleague Is a Robot' – Exploring Frontline Employees' Willingness to Work with Collaborative Service Robots", title);
}

#[test]
Expand Down
Loading