Bladeren bron

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

tags/v0.3.1
Ben Kurtovic 11 jaren geleden
bovenliggende
commit
951a8737a5
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +1
    -1
      mwparserfromhell/parser/tokenizer.c
  2. +1
    -1
      mwparserfromhell/parser/tokenizer.py

+ 1
- 1
mwparserfromhell/parser/tokenizer.c Bestand weergeven

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

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


Laden…
Annuleren
Opslaan