Add support for notes conditional trimming

Signed-off-by: Itai Koren <itkoren@gmail.com>