Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
f2336b61
Commit
f2336b61
authored
Apr 26, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduce inline CSS class overhead a little and tighten C code specific selectors in the CSS template
parent
901d7f57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
Cython/Compiler/Annotate.py
Cython/Compiler/Annotate.py
+16
-22
No files found.
Cython/Compiler/Annotate.py
View file @
f2336b61
...
@@ -65,30 +65,24 @@ class AnnotationCCodeWriter(CCodeWriter):
...
@@ -65,30 +65,24 @@ class AnnotationCCodeWriter(CCodeWriter):
"""
"""
_css_template
=
"""
_css_template
=
"""
body.cython { font-family: courier; font-size: 12; }
body { font-family: courier; font-size: 12; }
.cython.code { font-size: 9; color: #444444; display: none; margin-left: 20px; }
.cython.py_c_api { color: red; }
.cython.py_macro_api { color: #FF7000; }
.cython.pyx_c_api { color: #FF3000; }
.cython.pyx_macro_api { color: #FF7000; }
.cython.refnanny { color: #FFA000; }
.cython.error_goto { color: #FFA000; }
.cython.tag { }
.cython.tag { }
.cython.coerce { color: #008000; border: 1px dotted #008000 }
.cython.py_attr { color: #FF0000; font-weight: bold; }
.cython.c_attr { color: #0000FF; }
.cython.py_call { color: #FF0000; font-weight: bold; }
.cython.c_call { color: #0000FF; }
.cython.line { margin: 0em }
.cython.line { margin: 0em }
.cython.code { font-size: 9; color: #444444; display: none; margin-left: 20px; }
.cython.code .py_c_api { color: red; }
.cython.code .py_macro_api { color: #FF7000; }
.cython.code .pyx_c_api { color: #FF3000; }
.cython.code .pyx_macro_api { color: #FF7000; }
.cython.code .refnanny { color: #FFA000; }
.cython.code .error_goto { color: #FFA000; }
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
.cython.code .c_attr { color: #0000FF; }
.cython.code .py_call { color: #FF0000; font-weight: bold; }
.cython.code .c_call { color: #0000FF; }
"""
"""
def
save_annotation
(
self
,
source_filename
,
target_filename
):
def
save_annotation
(
self
,
source_filename
,
target_filename
):
...
@@ -114,7 +108,7 @@ body { font-family: courier; font-size: 12; }
...
@@ -114,7 +108,7 @@ body { font-family: courier; font-size: 12; }
{js}
{js}
</script>
</script>
</head>
</head>
<body>
<body
class="cython"
>
<p>Generated by Cython {watermark}</p>
\
n
'''
.
format
(
<p>Generated by Cython {watermark}</p>
\
n
'''
.
format
(
css
=
self
.
_css
(),
js
=
self
.
_js
,
watermark
=
Version
.
watermark
)]
css
=
self
.
_css
(),
js
=
self
.
_js
,
watermark
=
Version
.
watermark
)]
if
c_file
:
if
c_file
:
...
@@ -150,7 +144,7 @@ body { font-family: courier; font-size: 12; }
...
@@ -150,7 +144,7 @@ body { font-family: courier; font-size: 12; }
def
annotate
(
match
):
def
annotate
(
match
):
group_name
=
match
.
lastgroup
group_name
=
match
.
lastgroup
calls
[
group_name
]
+=
1
calls
[
group_name
]
+=
1
return
ur"<span class='
cython
%s'>%s</span>"
%
(
return
ur"<span class='%s'>%s</span>"
%
(
group_name
,
match
.
group
(
group_name
))
group_name
,
match
.
group
(
group_name
))
for
k
,
line
in
enumerate
(
lines
,
1
):
for
k
,
line
in
enumerate
(
lines
,
1
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment