Skip to content

Commit

Permalink
feat: Porting RSS Template to Language Function (Fixes #621)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 12, 2023
1 parent ed4d270 commit b94735b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 65 deletions.
23 changes: 23 additions & 0 deletions Commands/Languages/RSS/RSS-Language.ps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Language function RSS {
<#
.SYNOPSIS
RSS Language Definition.
.DESCRIPTION
Allows PipeScript to generate RSS.
Multiline comments blocks like this ```<!--{}-->``` will be treated as blocks of PipeScript.
#>
[ValidatePattern('\.rss$')]
param()


# We start off by declaring a number of regular expressions:
$startComment = '<\!--' # * Start Comments ```<!--```
$endComment = '-->' # * End Comments ```-->```
$Whitespace = '[\s\n\r]{0,}'
# * StartPattern ```$StartComment + '{' + $Whitespace```
$startPattern = "(?<PSStart>${startComment}\{$Whitespace)"
# * EndPattern ```$whitespace + '}' + $EndComment```
$endPattern = "(?<PSEnd>$Whitespace\}${endComment}\s{0,})"

}
65 changes: 0 additions & 65 deletions Transpilers/Templates/RSS.Template.psx.ps1

This file was deleted.

0 comments on commit b94735b

Please sign in to comment.