Skip to content

Commit

Permalink
Merge pull request #249 from RevanProdigalKnight/htmlformatter-tag-ex…
Browse files Browse the repository at this point in the history
…pansion-fix

Htmlformatter tag expansion fix
  • Loading branch information
akalongman authored Jul 7, 2016
2 parents d12d666 + e76eb7e commit 1af35f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codeformatter/lib/coldfusionbeautifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self, source_text, opts=default_options()):

def expand_tag(self,str):
_str = str.group(0) # cache the original string in a variable for faster access
s = re.findall(r'([\w\-]+(?:=(?:"[^"]*"|\'[^\']*\'))?)',_str)
s = re.findall(r'(<[\S]+(?:=(?:"[^"]*"|\'[^\']*\'))?)',_str)
# If the tag has fewer than "minimum_attribute_count" attributes, leave it alone
if len(s) <= self.minimum_attribute_count: return _str
tagEnd = re.search(r'/?>$',_str)
Expand Down
2 changes: 1 addition & 1 deletion codeformatter/lib/htmlbeautifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self, source_text, opts=default_options()):

def expand_tag(self,str):
_str = str.group(0) # cache the original string in a variable for faster access
s = re.findall(r'([\w\-]+(?:=(?:"[^"]*"|\'[^\']*\'))?)',_str)
s = re.findall(r'(<[\S]+(?:=(?:"[^"]*"|\'[^\']*\'))?)',_str)
# If the tag has fewer than "minimum_attribute_count" attributes, leave it alone
if len(s) <= self.minimum_attribute_count: return _str
tagEnd = re.search(r'/?>$',_str)
Expand Down

0 comments on commit 1af35f0

Please sign in to comment.