Expose named capture groups and earlier variables in jinja variables (ref #5)
This commit is contained in:
parent
0790b429b3
commit
b213481d7d
5 changed files with 24 additions and 14 deletions
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
from typing import Callable, List, Optional
|
||||
from typing import Callable, List, Dict, Optional
|
||||
import re
|
||||
|
||||
|
||||
|
@ -22,6 +22,10 @@ class BlankMatch:
|
|||
def groups() -> List[str]:
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def groupdict() -> Dict[str, str]:
|
||||
return {}
|
||||
|
||||
|
||||
class SimplePattern:
|
||||
_ptm = BlankMatch()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue