From beb9a4d3edbebc603fc53c0fb7a866716fd5222f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Hrb=C3=A1=C4=8D?= <david@hrbac.cz>
Date: Fri, 27 Jan 2017 14:52:10 +0100
Subject: [PATCH] Corrected title test

---
 docs.it4i/modules-salomon.md | 2 +-
 scripts/titlemd_test.py      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs.it4i/modules-salomon.md b/docs.it4i/modules-salomon.md
index 930eaabc6..65a3a3a62 100644
--- a/docs.it4i/modules-salomon.md
+++ b/docs.it4i/modules-salomon.md
@@ -293,7 +293,7 @@
 | [iimpi](http://software.intel.com/en-us/intel-cluster-toolkit-compiler/) | Intel C/C++ and Fortran compilers, alongside Intel MPI. |
 | [intel](http://software.intel.com/en-us/intel-cluster-toolkit-compiler/) | Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL. |
 | [PRACE](http://www.prace-ri.eu/PRACE-Common-Production) | The PRACE Common Production Environment (PCPE) is a set of software tools and libraries that are planned to be available on all PRACE execution sites. The PCPE also defines a set of environment variables that try to make compilation on all sites as homogeneous and simple as possible. |
-| [prace](http://www.prace-ri.eu/PRACE-Common-Production) | **** PRACE Common Production Environment (PCPE) **** Initialisation of the PRACE common production environment. This allows you to assume that the following tools/libraries are available by default in your PATH/environment. * Fortran, C, C++ Compilers * MPI * BLAS, LAPACK, BLACS, ScaLAPACK * FFTW * HDF5, NetCDF The compiler commands on are: * mpif90 - Fortran compiler * mpicc - C compiler * mpicxx - C++ compiler For more information on the PCPE please see the documentation at: http://www.prace-ri.eu/PRACE-Common-Production For help using this system, please see Local User Guide available at: http://prace-ri.eu/Best-Practice-Guide-Anselm-HTML |
+| [prace](http://www.prace-ri.eu/PRACE-Common-Production) | PRACE Common Production Environment (PCPE) Initialisation of the PRACE common production environment. This allows you to assume that the following tools/libraries are available by default in your PATH/environment. * Fortran, C, C++ Compilers * MPI * BLAS, LAPACK, BLACS, ScaLAPACK * FFTW * HDF5, NetCDF The compiler commands on are: * mpif90 - Fortran compiler * mpicc - C compiler * mpicxx - C++ compiler For more information on the PCPE please see the documentation at: http://www.prace-ri.eu/PRACE-Common-Production For help using this system, please see Local User Guide available at: http://prace-ri.eu/Best-Practice-Guide-Anselm-HTML |
 
 ## Tools
 
diff --git a/scripts/titlemd_test.py b/scripts/titlemd_test.py
index 722c17ef1..38ad036ad 100755
--- a/scripts/titlemd_test.py
+++ b/scripts/titlemd_test.py
@@ -29,7 +29,6 @@ def main(location):
       prev_line = lines.pop(0)
       disabled = 0
       echo_filename = False
-      #print(`location`)
       for line in lines:
           if line.startswith("``") and disabled == 0:
               disabled = 1
@@ -47,13 +46,14 @@ def main(location):
               return_value = 1
           if (line.startswith('---') or line.startswith('===')) and disabled == 0:
             if prev_line != titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):]:
+              if return_value == 0 and echo_filename == False:
+                print("%s" % location)
+                echo_filename = True
               print("-"+prev_line,end="")
               print("+"+titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):],end="")
               print()
               return_value = 1
           prev_line = line
-      #if return_value == 0:
-      #    print("==Ok==")
       exit(return_value)
 if __name__ == "__main__":
   try:
-- 
GitLab