瀏覽代碼

Don't pass underlying context if this is a bracketed link.

tags/v0.3.1
Ben Kurtovic 11 年之前
父節點
當前提交
951a8737a5
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      mwparserfromhell/parser/tokenizer.c
  2. +1
    -1
      mwparserfromhell/parser/tokenizer.py

+ 1
- 1
mwparserfromhell/parser/tokenizer.c 查看文件

@@ -870,7 +870,7 @@ static int Tokenizer_parse_bracketed_uri_scheme(Tokenizer* self)
Py_UNICODE this;
int slashes, i;

if (Tokenizer_push(self, self->topstack->context | LC_EXT_LINK_URI))
if (Tokenizer_push(self, LC_EXT_LINK_URI))
return -1;
if (Tokenizer_READ(self, 0) == *"/" && Tokenizer_READ(self, 1) == *"/") {
if (Tokenizer_emit_text(self, "//"))


+ 1
- 1
mwparserfromhell/parser/tokenizer.py 查看文件

@@ -315,7 +315,7 @@ class Tokenizer(object):

def _parse_bracketed_uri_scheme(self):
"""Parse the URI scheme of a bracket-enclosed external link."""
self._push(self._context | contexts.EXT_LINK_URI)
self._push(contexts.EXT_LINK_URI)
if self._read() == self._read(1) == "/":
self._emit_text("//")
self._head += 2


Loading…
取消
儲存