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)
This commit is contained in:
parent
5cbeaa9ad8
commit
daf456b956
1 changed files with 1 additions and 1 deletions
2
bb.sh
2
bb.sh
|
@ -362,7 +362,7 @@ edit() {
|
||||||
# Title
|
# Title
|
||||||
echo "$(get_post_title $1)" > "$TMPFILE"
|
echo "$(get_post_title $1)" > "$TMPFILE"
|
||||||
# Post text with plaintext tags
|
# 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
|
rm $1
|
||||||
$EDITOR "$TMPFILE"
|
$EDITOR "$TMPFILE"
|
||||||
if [ "$2" = "keep" ]; then
|
if [ "$2" = "keep" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue