Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Per-document hyphenation using hyphenate metadata flag.
  • Loading branch information
ralsina committed Sep 10, 2015
1 parent 6333a1a commit c048294
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion nikola/post.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c048294

Please sign in to comment.