Skip to content
Permalink
Browse files

Per-document hyphenation using hyphenate metadata flag.

  • Loading branch information
ralsina committed Sep 10, 2015
1 parent 6333a1a commit c04829420349d43910fa6d1843134088def89714
Showing with 6 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +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

0 comments on commit c048294

Please sign in to comment.