Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bleargh45/template-plugin-stripcomments
Template Toolkit filter to strip comment blocks
https://github.com/bleargh45/template-plugin-stripcomments
html-comments template-toolkit
Last synced: 22 days ago
JSON representation
Template Toolkit filter to strip comment blocks
- Host: GitHub
- URL: https://github.com/bleargh45/template-plugin-stripcomments
- Owner: bleargh45
- Created: 2020-12-31T21:50:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T20:11:25.000Z (over 1 year ago)
- Last Synced: 2024-10-15T16:24:08.678Z (2 months ago)
- Topics: html-comments, template-toolkit
- Language: Perl
- Homepage: http://metacpan.org/release/Template-Plugin-StripComments/
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Template::Plugin::StripComments - Template Toolkit filter to strip comment blocks
# SYNOPSIS
```
[% USE StripComments %]
...
[% FILTER stripcomments %]
/* C-style block comments get removed */
[% END %]
...
[% text | stripcomments %]
```# DESCRIPTION
`Template::Plugin::StripComments` is a filter plugin for [Template::Toolkit](https://metacpan.org/pod/Template%3A%3AToolkit),
which strips comment blocks from the filtered text.The following types of comment blocks are stripped:
- /\* c-style comments \*/
- <!-- HTML comments --># METHODS
- init()
Initializes the template plugin.
- filter($text)
Filters the given text, removing comment blocks as necessary.
# AUTHOR
Graham TerMarsch
# COPYRIGHT
Copyright (C) 2007, Graham TerMarsch. All Rights Reserved.
This is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.# SEE ALSO
[Template::Plugin::Filter](https://metacpan.org/pod/Template%3A%3APlugin%3A%3AFilter).