главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksei Shpakovskii <alekseis@opera.com>2014-03-19 18:02:15 +0100
committerAleksei Shpakovskii <alekseis@opera.com>2014-03-19 18:02:15 +0100
commitdaf456b9560be7a01cbc57b03fc800dfbad1a452 (patch)
treef1364eb2facf1f8a34e34533797584a16f76c8f5
parent5cbeaa9ad83d6d7f090a56bdea5b0a6c29b9e1d1 (diff)
Clean up tag links only in "Tags:" line
The bug was that if you decide, for some reason, insert links to tag pages into text of your article, then after editing this article, the links were gone. That happened because "tag links cleaning" was too agressive (it was cleaning tags not only on tag line, but in the whole text)
-rwxr-xr-xbb.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bb.sh b/bb.sh
index 0dda557..470b5e1 100755
--- a/bb.sh
+++ b/bb.sh
@@ -362,7 +362,7 @@ edit() {
# Title
echo "$(get_post_title $1)" > "$TMPFILE"
# Post text with plaintext tags
- get_html_file_content 'text' 'text' <$1 | sed "s|<a href='$prefix_tags\([^']*\).html'>\\1</a>|\\1|g" >> "$TMPFILE"
+ get_html_file_content 'text' 'text' <$1 | sed "/^<p>$template_tags_line_header/s|<a href='$prefix_tags\([^']*\).html'>\\1</a>|\\1|g" >> "$TMPFILE"
rm $1
$EDITOR "$TMPFILE"
if [ "$2" = "keep" ]; then