Skip to content
Snippets Groups Projects
Commit e07919d1 authored by Hartung, Michael's avatar Hartung, Michael
Browse files

Bugfix: Icon classstring as special case in CSS prefixing

parent f919f4bb
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ def find_nth(haystack, needle, n): ...@@ -16,6 +16,7 @@ def find_nth(haystack, needle, n):
class ParserHTML: class ParserHTML:
PREFIX = 'drugstone-plugin-' PREFIX = 'drugstone-plugin-'
CLASSSEARCHPATTERN = 'class="' CLASSSEARCHPATTERN = 'class="'
ICONCLASSSEARCHPATTERN = 'classString="'
IDSEARCHPATTERN = 'id="' IDSEARCHPATTERN = 'id="'
NGCLASSSEARCHPATTERN = '[ngClass]="' NGCLASSSEARCHPATTERN = '[ngClass]="'
PARSEDFILENEDING = '.parsed' PARSEDFILENEDING = '.parsed'
...@@ -144,7 +145,13 @@ class ParserHTML: ...@@ -144,7 +145,13 @@ class ParserHTML:
classStart += len(self.CLASSSEARCHPATTERN) classStart += len(self.CLASSSEARCHPATTERN)
classIndices, classEnd = self.findClassStrings(line, classStart) classIndices, classEnd = self.findClassStrings(line, classStart)
line = self.updateClassStrings(line, classIndices, classStart, classEnd, iTagOpen) line = self.updateClassStrings(line, classIndices, classStart, classEnd, iTagOpen)
iconClassStart = line.find(self.ICONCLASSSEARCHPATTERN)
if iconClassStart > -1:
iconClassStart += len(self.ICONCLASSSEARCHPATTERN)
classIndices, classEnd = self.findClassStrings(line, iconClassStart)
line = self.updateClassStrings(line, classIndices, iconClassStart, classEnd, iTagOpen)
ngClassStart = line.find(self.NGCLASSSEARCHPATTERN) ngClassStart = line.find(self.NGCLASSSEARCHPATTERN)
if ngClassStart > -1: if ngClassStart > -1:
ngClassStart += len(self.NGCLASSSEARCHPATTERN) ngClassStart += len(self.NGCLASSSEARCHPATTERN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment