Commit ae702d17 authored by Filippo Leonardi's avatar Filippo Leonardi

Fix 8blame

parent d7fb3c58
......@@ -62,6 +62,25 @@
% Define appearance of C++ code
\lstdefinestyle{CPP}{
basicstyle={\ttfamily \small},
numberstyle=\color{gray},
commentstyle=\color{gray},
stringstyle=\textit,
showstringspaces=false,
mathescape=true,
basewidth=0.58em,
columns=fixed,
tabsize=2,
fontadjust=true,
frame=lb,
xleftmargin=4.2pt,
numbers=left,
stepnumber=1,
breaklines=false,
breakindent=0pt,
prebreak=\mbox{\tiny$\searrow$},
postbreak=\mbox{{\color{gray}$\cdots$}},
keywordstyle=\bfseries,
stepnumber=1,
language=C++,
mathescape=false,
......@@ -85,6 +104,7 @@
tabsize=2,
xleftmargin=4.2pt,
stepnumber=1,
frame=lb,
}
\lstdefinestyle{MATLAB}{
......
......@@ -69,12 +69,12 @@ invalid_filenames = [
lambda x: bool(x.endswith('~')), # Autosaved junk
lambda x: x.find('#') != -1, # ???
#lambda x: bool(x.endswith('.autosave')), # Eclipse autosave file ignored
lambda x: bool(x.startswith('.')), # Hidden files 8blame Eclipse)
lambda x: bool(x.startswith('.')), # Hidden files (blame Eclipse)
lambda x: bool('CMake' in x), # CMake junk
lambda x: bool('cmake_install' in x), # CMake junk
lambda x: bool('Makefile' in x), # CMake junk
lambda x: bool(x.endswith('.cbp')), # Code::Blocks project file
lambda x: bool(x.startswith('CMake')), # Hidden files 8blame Eclipse)
lambda x: bool(x.startswith('CMake')), # Hidden files (blame Eclipse)
]
......@@ -176,11 +176,13 @@ def modified_lines_option(filename, template_dir):
print(mod_lines)
mod_lines = mod_lines.split(" ")
mod_lines = [s for s in mod_lines if s != ""]
#print(mod_lines)
pattern = '\\ifnum\\value{{lstnumber}}={:s}\\color{{green!40}}\\fi'
tex = 'linebackgroundcolor={'
tex = tex + "".join(pattern.format(k) for k in mod_lines)
tex = tex + '}'
#print(tex)
return tex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment