[docmaker] Fix missing `Defined in (...)' under Windows/Cygwin. This platform uses backslashes for paths, which docmaker didn't understand correctly. * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use `os.path.normpath' to normalize the path for the platform being used.
diff --git a/ChangeLog b/ChangeLog
index 7c19448..1d46029 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
+
+ [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
+
+ This platform uses backslashes for paths, which docmaker didn't
+ understand correctly.
+
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
+ `os.path.normpath' to normalize the path for the platform being
+ used.
+
2018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Formalize Harmony LCD rendering.
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index 9f318a2..97a5459 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -676,7 +676,8 @@ class HtmlFormatter( Formatter ):
if block.code:
header = ''
for f in self.headers.keys():
- if block.source.filename.find( f ) >= 0:
+ header_filename = os.path.normpath(block.source.filename)
+ if header_filename.find( os.path.normpath( f ) ) >= 0:
header = self.headers[f] + ' (' + f + ')'
break