summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2019-05-27 16:37:07 +0200
committerStefan Sauer <ensonic@users.sf.net>2019-05-27 16:43:28 +0200
commit12d9a698fb58f3d1a840d3bfc0d15a3a9f57afc1 (patch)
treeb51142c916fec657050170eb3becb89a48100945
parentdea101c19ef20dd97d9fafaf548c77a0a920bff6 (diff)
downloadgtk-doc-12d9a698fb58f3d1a840d3bfc0d15a3a9f57afc1.tar.gz
Reapply and fix previous change.
This is required for make dist-check and some distro-packages. But now pick sensible permissions. Revert "Revert "highlight: make style-file writable before appending"" This reverts commit 9467f121fb728866a2366df65805aea1a587ac7e. See #84
-rw-r--r--gtkdoc/highlight.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtkdoc/highlight.py b/gtkdoc/highlight.py
index 6023d33..ba1c601 100644
--- a/gtkdoc/highlight.py
+++ b/gtkdoc/highlight.py
@@ -22,6 +22,7 @@
"""
Highlight sourcecode snippets.
"""
+import os
from pygments import highlight
from pygments.lexers import CLexer
@@ -45,5 +46,6 @@ def highlight_code(code, lang='c'):
def append_style_defs(css_file_name):
+ os.chmod(css_file_name, 0o644)
with open(css_file_name, 'at', newline='\n', encoding='utf-8') as css:
css.write(HTML_FORMATTER.get_style_defs())