소스 검색

Increase MAX_DEPTH to 100 (#314)

* Increase MAX_DEPTH to 100

* Update nested_templates_and_style_tags to cover new limit
tags/v0.6.6
David Ebbo 4 달 전
committed by GitHub
부모
커밋
4acb885b9f
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +1
    -1
      src/mwparserfromhell/parser/ctokenizer/tok_support.h
  2. +1
    -1
      src/mwparserfromhell/parser/tokenizer.py
  3. +2
    -2
      tests/tokenizer/integration.mwtest

+ 1
- 1
src/mwparserfromhell/parser/ctokenizer/tok_support.h 파일 보기

@@ -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 파일 보기

@@ -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\"\'\\]+)")



+ 2
- 2
tests/tokenizer/integration.mwtest
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장