Skip to content

Commit 4ec5a08

Browse files
authored
Merge pull request #191 from inalto/master
nginx config fixes and small fixes to avoid deprecated warnings
2 parents 9faef74 + 191d78f commit 4ec5a08

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

docker/development.nginx.conf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@ http {
2121
root /var/www/html;
2222
index index.php index.html index.htm;
2323

24+
location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg)$ {
25+
try_files $uri =404;
26+
add_header Cache-Control "public, max-age=3600";
27+
}
28+
location ~* \.md$ {
29+
return 301 /;
30+
}
2431
location / {
25-
try_files $uri $uri/ /index.php?$args;
32+
if (!-e $request_filename){
33+
rewrite ^/(.*)$ /index.php?doc=$1 last;
34+
}
35+
try_files $uri $uri/ =404;
2636
}
2737

2838
location ~ \.php$ {
@@ -38,4 +48,3 @@ http {
3848
}
3949
}
4050
}
41-

libraries/parsedown-extended-1.1.2-modified/ParsedownExtended.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class ParsedownExtended extends DynamicParent
2424
public const ID_ATTRIBUTE_DEFAULT = 'toc';
2525
protected $tagToc = '[toc]';
2626

27+
protected $options;
28+
2729
protected $contentsListArray = [];
2830
protected $contentsListString = '';
2931
protected $firstHeadLevel = 0;

libraries/parsedown-extra-0.8.1/ParsedownExtra.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ protected function processTag($elementMarkup) # recursive
625625
$DOMDocument = new DOMDocument;
626626

627627
# http://stackoverflow.com/q/11309194/200145
628-
$elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8');
629-
628+
$elementMarkup = html_entity_decode($elementMarkup, ENT_COMPAT | ENT_HTML5, 'UTF-8');
629+
630630
# http://stackoverflow.com/q/4879946/200145
631631
$DOMDocument->loadHTML($elementMarkup);
632632
$DOMDocument->removeChild($DOMDocument->doctype);

0 commit comments

Comments
 (0)