scala pattern and add tag to previous post