Skip to content

Commit

Permalink
Conditionals now check whether attributes are empty or not
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcomboom committed Oct 24, 2019
1 parent e0313f1 commit 08008c6
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 192 deletions.
5 changes: 4 additions & 1 deletion About.resx
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,10 @@ SOFTWARE.</value>
</value>
</data>
<data name="ChangelogBox.Text" xml:space="preserve">
<value>0.9.8 - Milkshake:
<value>0.9.8.1 - Malt:
+ Conditionals can now check if attributes are empty/non-existent properly

0.9.8 - Milkshake:
+ Double clicking any file while the editor is collapsed will open it with the default program/shell behavior
+ Sanitary Build added
+ Engine selection moved to top-level of Build menu
Expand Down
20 changes: 20 additions & 0 deletions Editor.vb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,26 @@ Public Class Editor
End If
End If

' check emptiness
If fullStr.StartsWith("[" & key & "=]") Then
If attribs.ContainsKey(key) Then
If attribs.Item(key) = "" Then
pass = True
End If
Else
pass = True
End If
End If
If fullStr.StartsWith("[" & key & "!=]") Then
If attribs.ContainsKey(key) Then
If attribs.Item(key) = "" Then
pass = True
End If
Else
pass = True
End If
End If

If pass Then
If equality = True Then
newHtml = newHtml.Replace(fullStr, html)
Expand Down
Loading

0 comments on commit 08008c6

Please sign in to comment.