mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Log a warning when the HTML reader encounters a nonconformant meta tag
Instead of throwing an exception and skipping the HTML file, log a warning with a message which makes it more obvious as to what happened.
This commit is contained in:
parent
455c159b48
commit
35375b19ff
4 changed files with 29 additions and 1 deletions
|
|
@ -384,3 +384,13 @@ class HTMLReaderTest(ReaderTest):
|
|||
self.assertIn('category', page.metadata, 'Key should be lowercase.')
|
||||
self.assertEqual('Yeah', page.metadata.get('category'),
|
||||
'Value keeps cases.')
|
||||
|
||||
def test_article_with_nonconformant_meta_tags(self):
|
||||
page = self.read_file(path='article_with_nonconformant_meta_tags.html')
|
||||
expected = {
|
||||
'summary': 'Summary and stuff',
|
||||
'title': 'Article with Nonconformant HTML meta tags',
|
||||
}
|
||||
|
||||
for key, value in expected.items():
|
||||
self.assertEqual(value, page.metadata[key], key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue