Skip to content
Permalink
Browse files

Little optimizations for parser and updated Iconify and MDI icons

  • Loading branch information
giterlizzi committed Feb 19, 2020
1 parent ac8b3b2 commit e7e3613e5c12dc14158e4cd8e3e1238f277315cf
Showing with 1,804 additions and 921 deletions.
  1. +8 −5 Template.php
  2. +1 −1 assets/iconify/iconify.min.js
  3. +1,794 −914 assets/iconify/json/mdi.json
  4. +1 −1 template.info.txt
@@ -1772,6 +1772,14 @@ public function normalizeContent($content)
# Workaround for ToDo Plugin
$content = str_replace('checked="checked"', ' checked="checked"', $content);

# Search Hit
$content = str_replace('<span class="search_hit">', '<span class="mark">', $content);

# Return original content if Simple HTML DOM fail or exceeded page size (default MAX_FILE_SIZE => 600KB)
if (strlen($content) > MAX_FILE_SIZE) {
return $content;
}

# Import HTML string
$html = new \simple_html_dom;
$html->load($content, true, false);
@@ -1842,11 +1850,6 @@ public function normalizeContent($content)
$elm->innertext = iconify('mdi:table') . ' ' . $elm->innertext;
}

# Search Hit
foreach ($html->find('.search_hit') as $elm) {
$elm->class = 'mark';
}

# Tabs
foreach ($html->find('.tabs') as $elm) {
$elm->class = 'nav nav-tabs';

0 comments on commit e7e3613

Please sign in to comment.
You can’t perform that action at this time.