isml-linter 5.43.7 → 5.43.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/isml_tree/IsmlNode.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.43.8] - 2023-03-04
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Identification of HTML tag attributes even when there is no blank space separating them;
|
|
7
|
+
|
|
3
8
|
## [5.43.7] - 2023-03-03
|
|
4
9
|
|
|
5
10
|
### Fixed
|
|
@@ -1124,6 +1129,7 @@
|
|
|
1124
1129
|
### Added
|
|
1125
1130
|
- Linter is published;
|
|
1126
1131
|
|
|
1132
|
+
[5.43.8]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.7...v5.43.8
|
|
1127
1133
|
[5.43.7]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.6...v5.43.7
|
|
1128
1134
|
[5.43.6]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.5...v5.43.6
|
|
1129
1135
|
[5.43.5]: https://github.com/FabiowQuixada/isml-linter/compare/v5.43.4...v5.43.5
|
package/package.json
CHANGED
|
@@ -450,7 +450,7 @@ const getAttributes = node => {
|
|
|
450
450
|
const firstSpaceAfterTagPos = ParseUtils.getFirstEmptyCharPos(trimmedHead);
|
|
451
451
|
const leadingEmptySpaceQty = ParseUtils.getNextNonEmptyCharPos(nodeHead);
|
|
452
452
|
const afterTagContent = nodeHead.substring(leadingEmptySpaceQty + firstSpaceAfterTagPos);
|
|
453
|
-
const rawAttributeList = getStringifiedAttributeArray(afterTagContent);
|
|
453
|
+
const rawAttributeList = getStringifiedAttributeArray(afterTagContent.trim());
|
|
454
454
|
const attributeList = [];
|
|
455
455
|
|
|
456
456
|
for (let i = 0; i < rawAttributeList.length; i++) {
|
|
@@ -500,6 +500,7 @@ const getStringifiedAttributeArray = content => {
|
|
|
500
500
|
|
|
501
501
|
const maskedAttributeList = maskedContent
|
|
502
502
|
.replace(/><+/g, '> <')
|
|
503
|
+
.replace(/"</g, '" <')
|
|
503
504
|
.replace(/\s\s+/g, ' ')
|
|
504
505
|
.split(' ')
|
|
505
506
|
.filter(attr => attr);
|
|
@@ -509,6 +510,8 @@ const getStringifiedAttributeArray = content => {
|
|
|
509
510
|
attrStartPosList.push(i);
|
|
510
511
|
} else if (maskedContent[i - 1] === ' ' && maskedContent[i] !== ' ' || maskedContent[i - 1] === '>' && maskedContent[i] === '<') {
|
|
511
512
|
attrStartPosList.push(i);
|
|
513
|
+
} else if (maskedContent[i - 1] === '"' && maskedContent[i] === '<') {
|
|
514
|
+
attrStartPosList.push(i + 1);
|
|
512
515
|
}
|
|
513
516
|
}
|
|
514
517
|
|