Parcourir la source

Increase MAX_DEPTH to 100

pull/314/head
David Ebbo il y a 4 mois
committed by GitHub
Parent
révision
9eb7459632
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +1
    -1
      src/mwparserfromhell/parser/ctokenizer/tok_support.h
  2. +1
    -1
      src/mwparserfromhell/parser/tokenizer.py

+ 1
- 1
src/mwparserfromhell/parser/ctokenizer/tok_support.h Voir le fichier

@@ -49,7 +49,7 @@ Py_UCS4 Tokenizer_read_backwards(Tokenizer *, Py_ssize_t);

/* Macros */

#define MAX_DEPTH 40
#define MAX_DEPTH 100
#define Tokenizer_CAN_RECURSE(self) (self->depth < MAX_DEPTH)
#define Tokenizer_IS_CURRENT_STACK(self, id) \
(self->topstack->ident.head == (id).head && \


+ 1
- 1
src/mwparserfromhell/parser/tokenizer.py Voir le fichier

@@ -92,7 +92,7 @@ class Tokenizer:
END,
]
URISCHEME = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+.-"
MAX_DEPTH = 40
MAX_DEPTH = 100
regex = re.compile(r"([{}\[\]<>|=&'#*;:/\\\"\-!\n])", flags=re.IGNORECASE)
tag_splitter = re.compile(r"([\s\"\'\\]+)")



Chargement…
Annuler
Enregistrer