Pārlūkot izejas kodu

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

tags/v0.3.1
Ben Kurtovic pirms 11 gadiem
vecāks
revīzija
951a8737a5
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +1
    -1
      mwparserfromhell/parser/tokenizer.c
  2. +1
    -1
      mwparserfromhell/parser/tokenizer.py

+ 1
- 1
mwparserfromhell/parser/tokenizer.c Parādīt failu

@@ -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 Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt