Add Markdown test to populate

This commit is contained in:
Skia
2016-12-25 22:50:47 +01:00
parent f77856852d
commit 1dd28672b0
2 changed files with 173 additions and 5 deletions

View File

@ -9,9 +9,17 @@ class SithRenderer(Renderer):
class SithInlineLexer(InlineLexer):
def _process_link(self, m, link, title=None):
try:
page = re.compile(
r'^page://(\S*)' # page://nom_de_ma_page
)
match = page.search(link)
page = match.group(1) or ""
link = reverse('core:page', kwargs={'page_name': page})
except: pass
try:
file_link = re.compile(
r'^file://(\d*)/?(\S*)?' # dfile://4000/download
r'^file://(\d*)/?(\S*)?' # file://4000/download
)
match = file_link.search(link)
id = match.group(1)