Re-add charLimit and wordLimit functionality

This logic was commented-out in 5a8c2a072d and removed in f15b9aa84