X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=geekigeeki.py;h=5a401abde033bc06cd504fdb61c4e00fc41676e2;hb=62db44f1f908f7f3f0d9942f841b89115b8d6c67;hp=52010d6d33a1e0cd45e3c5033454be994b8dede6;hpb=3666a00d5ea2583d74043a5ac27cc848948fb6c7;p=geekigeeki.git diff --git a/geekigeeki.py b/geekigeeki.py index 52010d6..5a401ab 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -344,7 +344,7 @@ def send_footer(mod_string=None): Creative Commons License generated in %0.3fs by GeekiGeeki version %s

-''' % (relative_url('cc-by-sa.png'), clock() - start_time, __version__)) +''' % (relative_url('sys/cc-by-sa.png'), clock() - start_time, __version__)) if mod_string: print('

last modified %s

' % mod_string) print('') @@ -368,6 +368,7 @@ class WikiFormatter: "**": ["b", False], "##": ["tt", False], "__": ["u", False], + "--": ["del", False], "^^": ["sup", False], ",,": ["sub", False], "''": ["em", False], # LEGACY @@ -380,6 +381,9 @@ class WikiFormatter: style[1] = not style[1] return ['' + def _glyph_repl(self, word): + return '—' + def _tit_repl(self, word): if self.h_level: result = '

\n' % self.h_level @@ -535,19 +539,20 @@ class WikiFormatter: print('

') scan_re = re.compile(r"""(?: - # Styles and formatting - (?P \*\*|'''|//|''|\#\#|``|__|\^\^|,,) + # Styles and formatting ("--" must cling to a word to disambiguate it from the dash) + (?P \*\* | // | \#\# | __ | --\b | \b-- | \^\^ | ,, | ''' | '' | `` ) | (?P \={2,6}) | (?P
\\\\) | (?P ^-{3,}) | (?P \b( FIXME | TODO | DONE )\b ) + | (?P --) # Links | (?P \<\<([^\s\|\>]+)(?:\s*\|\s*([^\>]+)|)\>\>) | (?P \[\[([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\]\]) # Inline HTML - | (?P <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) + | (?P <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) | (?P ( /\s*> | ) ) | (?P [<>&] )