Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Per-document hyphenation using hyphenate metadata flag.
- Loading branch information
Showing
with
6 additions
and
1 deletion.
-
+1
−0
CHANGES.txt
-
+5
−1
nikola/post.py
|
@@ -4,6 +4,7 @@ New in master |
|
|
Features |
|
|
-------- |
|
|
|
|
|
* Per-document hyphenation using "hyphenate" metadata flag. |
|
|
* New option USE_KATEX to switch from MathJax to KaTeX (Experimental). |
|
|
* Support SVG in galleries (Issue #1605) |
|
|
* Made TAG_PATH translatable (Issue #1914) |
|
|
|
@@ -129,7 +129,6 @@ def __init__( |
|
|
self._template_name = template_name |
|
|
self.is_two_file = True |
|
|
self.newstylemeta = True |
|
|
self.hyphenate = self.config['HYPHENATE'] |
|
|
self._reading_time = None |
|
|
self._remaining_reading_time = None |
|
|
self._paragraph_count = None |
|
@@ -231,6 +230,11 @@ def __init__( |
|
|
# Register potential extra dependencies |
|
|
self.compiler.register_extra_dependencies(self) |
|
|
|
|
|
def _get_hyphenate(self): |
|
|
return bool(self.config['HYPHENATE'] or self.meta('hyphenate')) |
|
|
|
|
|
hyphenate = property(_get_hyphenate) |
|
|
|
|
|
def __repr__(self): |
|
|
"""Provide a representation of the post object.""" |
|
|
# Calculate a hash that represents most data about the post |
|
|