sunlix / ProcessAbbreviate

Easily mark up and manage abbreviations
http://www.zenmotion.de
2 stars 0 forks source link

auto markup: multi found abbr's owerwrite persisted abbr #1

Closed sunlix closed 9 years ago

sunlix commented 9 years ago

If I have two abbreviations with different attributes set, the last matched abbreviation will win the race to database.

<ul>
    <li><abbr lang="en" title="United States of America">USA</abbr></li>
    <li><abbr title="United States of America">USA</abbr></li>
</ul>

I think I have not to overwrite persisted lang attributes with zero string if previously a lang attribute was set in database.

sunlix commented 9 years ago

There will be a IF statement to check if the supplied value is not an empty string. Only then the db row will be updated. I've provided the same IF statement for the abbreviation text.