Skip to content

Attributed string formatting #39

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

Merged
merged 2 commits into from
Sep 18, 2017
Merged

Attributed string formatting #39

merged 2 commits into from
Sep 18, 2017

Conversation

1ec5
Copy link
Member

@1ec5 1ec5 commented Sep 14, 2017

Added a new variant of OSRMInstructionFormatter.string(for:legIndex:numberOfLegs:roadClasses:modifyValueByKey:) that deals in NSAttributedString instead of String. NSAttributedString is the native rich text object model on Apple platforms, the only one that requires no custom parsing code to work with. Some serving suggestions:

Depends on #38.

/cc @frederoni @bsudekum

@1ec5 1ec5 self-assigned this Sep 14, 2017
@1ec5 1ec5 requested a review from frederoni September 14, 2017 20:12
@1ec5 1ec5 force-pushed the 1ec5-attributed-string branch from b688bc3 to 68e93da Compare September 15, 2017 15:37
@1ec5
Copy link
Member Author

1ec5 commented Sep 16, 2017

9e87268 adds unit tests for token replacement and fixes a couple edge cases that don’t occur in practice.

@1ec5 1ec5 force-pushed the 1ec5-attributed-string branch 2 times, most recently from 9c752fc to ee1df8b Compare September 16, 2017 11:04
Added a new variant of string(for:legIndex:numberOfLegs:roadClasses:modifyValueByKey:) that deals in attributed strings.
@1ec5 1ec5 force-pushed the 1ec5-attributed-string branch from ee1df8b to 0a8959e Compare September 16, 2017 17:20
@1ec5 1ec5 merged commit 3a4ef81 into master Sep 18, 2017
@1ec5 1ec5 deleted the 1ec5-attributed-string branch September 18, 2017 11:35
@1ec5 1ec5 restored the 1ec5-attributed-string branch September 18, 2017 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants