--- a/Tools__TagList.st Wed Sep 12 12:49:17 2012 +0200
+++ b/Tools__TagList.st Wed Sep 12 17:59:53 2012 +0200
@@ -2650,6 +2650,7 @@
'table' hideHTMLTable
'script' hideHTMLScript
'form' hideHTMLForm
+ 'a' nil
'h1' hideHTMLHeaders
'h2' hideHTMLHeaders
'h3' hideHTMLHeaders
@@ -2657,20 +2658,39 @@
'h5' hideHTMLHeaders
'h6' hideHTMLHeaders
) pairWiseDo:[:nm :hideInstVarName|
- |type hideHolder idx tagText doc markup label text markupName markupType|
+ |type hideHolder idx tagText doc markup label text markupName markupType
+ isHeader|
type := hideHolder := nil.
idx := l indexOfSubCollection:('<',nm).
idx ~~ 0 ifTrue:[
- type := Tag::TElement.
- hideHolder := self instVarNamed:hideInstVarName.
+ hideHolder := hideInstVarName isNil
+ ifTrue:[ false ]
+ ifFalse:[ self instVarNamed:hideInstVarName ].
tagText := line copyFrom:idx.
doc := HTMLParser new parseText:tagText.
markup := doc markup.
markupName := markup name.
- markupType := markup type.
+ markupType := "markup tag ?" markup type.
+
+ isHeader := (#(h1 h2 h3 h4 h5 h6) includes:markupType).
+ isHeader ifTrue:[
+ type := Tag::THeaderElement
+ ] ifFalse: [
+ markupType == #'form' ifTrue:[
+ type := Tag::TFormElement
+ ] ifFalse:[
+ markupType == #'a' ifTrue:[
+ type := Tag::TAnchorElement.
+ markupName := markup hrefString notEmptyOrNil ifTrue:['"',markup hrefString,'"'] ifFalse:[ markup name ]
+ ] ifFalse:[
+ type := Tag::TElement
+ ]
+ ].
+ ].
+
markup id notEmptyOrNil ifTrue:[
label := nm , ' (',markup id,')'
] ifFalse:[
@@ -2678,15 +2698,15 @@
label := nm , ' (',markupName,')'
] ifFalse:[
(markupType == #input and:[ markup valueString notEmptyOrNil ]) ifTrue:[
- label := nm , ' (',markup valueString,')'
+ label := nm , ' ("',markup valueString,'")'
] ifFalse:[
(markupType == #script and:[ markup src notEmptyOrNil ]) ifTrue:[
label := nm , ' ("',markup src,'")'
] ifFalse:[
- ( (#(h1 h2 h3 h4 h5 h6) includes:markupType)
- and:[text := self plainTextBetweenHTMLElement:markup andElementWithTag:('/',markupType).
- text notEmpty
- ]) ifTrue:[
+ ( isHeader
+ and:[text := self plainTextBetweenHTMLElement:markup andElementWithTag:('/',markupType).
+ text notEmpty]
+ ) ifTrue:[
label := '"',text,'" (',nm,')'
] ifFalse:[
label := nm
@@ -2712,7 +2732,7 @@
^ targets
"Created: / 20-04-2011 / 18:59:29 / cg"
- "Modified: / 12-09-2012 / 12:47:06 / cg"
+ "Modified: / 12-09-2012 / 17:54:07 / cg"
!
javaScriptTagsInFile:aFilePath
@@ -3559,11 +3579,11 @@
!TagList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.17 2012-09-12 10:49:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.18 2012-09-12 15:59:53 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.17 2012-09-12 10:49:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.18 2012-09-12 15:59:53 cg Exp $'
!
version_SVN