Project

General

Profile

« Previous | Next » 

Revision 11951

bin/boldify: made it idempotent

View differences:

boldify
1 1
#!/bin/bash -e
2 2
# makes Redmine links bold
3
# idempotent
3 4
# usage: self <in >out
4 5
. "$(dirname "${BASH_SOURCE[0]}")"/../lib/sh/util.sh
5 6

  
6
clog++ sed -e 's/\[\[[^]]*\]\]/*&*/g' -e 's/(")([^"]*)(":)/\1*\2*\3/g'
7
clog++ sed \
8
-e 's/([^*])(\[\[[^]]*\]\])([^*])/\1*\2*\3/g' \
9
-e 's/(")([^"*]*)(":)/\1*\2*\3/g'

Also available in: Unified diff