Summary: | single xhtml tag not properly closed when editing tag using new GUI tag editor | ||
---|---|---|---|
Product: | quanta | Reporter: | Damon Lynch <damon> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Damon Lynch
2003-12-23 12:06:00 UTC
Apologies if I was not clear: I'm referring to the new editor which allows one to edit the CSS and other attributes in a tag. This bug exists with the latest version from CVS. I'm seeing this too. It's rather naster. from: <img src="curvtest.png" xml:lang="en" /> to: <img src="curvtest.png" xml:lang="en" /alt="some"> Subject: quanta_be: quanta/quanta CVS commit by amantia: Fix editing of single XML tags in the new attribute editor as well as autoclosing of them. CCMAIL: 71104-done@bugs.kde.org M +17 -8 document.cpp 1.216.2.21 --- quanta/quanta/document.cpp #1.216.2.20:1.216.2.21 @@ -261,5 +261,13 @@ void Document::changeTagAttribute(Tag *t } else { + index = tag->attrCount() - 1; + if (tag->attribute(index) == "/") + { + tag->attributeNamePos(index, line, col); + col--; + } else + { tag->endPos(line, col); + } if (attrValue.isEmpty()) { @@ -767,6 +775,4 @@ bool Document::xmlAutoCompletion(int lin if (!tag) tag = userTagList.find(tagName.lower()); - if ( !tag || tagName.isEmpty() ) //we are outside of any tag - { QString s = editIf->textLine(line).left(column + 1); int i = column; @@ -775,4 +781,7 @@ bool Document::xmlAutoCompletion(int lin s = s.left(i + 1); + if ( !tag || tagName.isEmpty() ) //we are outside of any tag + { + if ( s.endsWith(completionDTD->tagAutoCompleteAfter) ) // a tag is started { @@ -814,5 +823,6 @@ bool Document::xmlAutoCompletion(int lin else // we are inside of a tag { - if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") && tag) + if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") && + !s.endsWith("/>") && tag) { if ( tag->parentDTD->singleTagStyle == "xml" && @@ -866,5 +876,4 @@ bool Document::xmlAutoCompletion(int lin int bl, bc; node->tag->beginPos(bl, bc); - QString s; if (node->tag->attrCount() > 0) { |