Fix some things
This commit is contained in:
parent
939be3a600
commit
3fded8e384
|
@ -402,7 +402,7 @@ be a LOT better for security, but this is good enough for me.
|
||||||
|
|
||||||
If you want to read more about why I like Ungoogled Chromium, check
|
If you want to read more about why I like Ungoogled Chromium, check
|
||||||
out my article titled
|
out my article titled
|
||||||
[[Ungoogled Chromium - The best browser for most people]].
|
[Ungoogled Chromium - The best browser for most people](https://speedie.site/blog/Ungoogled+Chromium+-+The+best+browser+for+most+people).
|
||||||
|
|
||||||
## PDFs
|
## PDFs
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ or not. You know, to check if X or Wayland is used. The brainlet way to do
|
||||||
this would be something like this:
|
this would be something like this:
|
||||||
|
|
||||||
```Bash
|
```Bash
|
||||||
if \[[ -n "$DISPLAY" \]]; then
|
if [[ -n "$DISPLAY" ]]; then
|
||||||
x=true
|
x=true
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
9
blog.php
9
blog.php
|
@ -183,23 +183,14 @@ function toHTML($inText) {
|
||||||
$postPart = explode('#', $linkedPost)[0]; // split away an eventual anchor part
|
$postPart = explode('#', $linkedPost)[0]; // split away an eventual anchor part
|
||||||
$linkedFilename = fileNameForPost(sanitizeFilename($postPart));
|
$linkedFilename = fileNameForPost(sanitizeFilename($postPart));
|
||||||
$exists = file_exists($linkedFilename);
|
$exists = file_exists($linkedFilename);
|
||||||
$outHTML = str_replace("[[$fullLinkText]]",
|
|
||||||
postLink($linkedPost, $linkText, ($exists? "" : " class=\"noexist\"")), $outHTML);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$outHTML = preg_replace("/\{\{(.*?)\}\}/", "<img src=\"" . BASE_URI . "/images/\\1\" alt=\"\\1\" />", $outHTML);
|
|
||||||
|
|
||||||
preg_match_all("/<h([1-4])>(.*?)<\/h\\1>/", $outHTML, $matches, PREG_PATTERN_ORDER);
|
preg_match_all("/<h([1-4])>(.*?)<\/h\\1>/", $outHTML, $matches, PREG_PATTERN_ORDER);
|
||||||
|
|
||||||
for ($i = 0; $i < count($matches[0]); $i++) {
|
for ($i = 0; $i < count($matches[0]); $i++) {
|
||||||
$prefix = "<h".$matches[1][$i].">";
|
$prefix = "<h".$matches[1][$i].">";
|
||||||
$caption = $matches[2][$i];
|
$caption = $matches[2][$i];
|
||||||
$suffix = substr_replace($prefix, "/", 1, 0);
|
$suffix = substr_replace($prefix, "/", 1, 0);
|
||||||
|
|
||||||
/*
|
|
||||||
$outHTML = str_replace("$prefix$caption$suffix",
|
|
||||||
"$prefix<a id=\"".toHTMLID($caption)."\">$caption</a>$suffix", $outHTML);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $outHTML;
|
return $outHTML;
|
||||||
|
|
4
rss.xml
4
rss.xml
|
@ -72,7 +72,7 @@ I'm telling you this. Let's say you want to check if $DISPLAY is defined
|
||||||
or not. You know, to check if X or Wayland is used. The brainlet way to do
|
or not. You know, to check if X or Wayland is used. The brainlet way to do
|
||||||
this would be something like this:</p>
|
this would be something like this:</p>
|
||||||
|
|
||||||
<pre><code class="Bash">if \<a href="/blog.php/+-n+%22%24DISPLAY%22+-" class="noexist"> -n "$DISPLAY" \</a>; then
|
<pre><code class="Bash">if [[ -n "$DISPLAY" ]]; then
|
||||||
x=true
|
x=true
|
||||||
fi
|
fi
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -969,7 +969,7 @@ be a LOT better for security, but this is good enough for me.</p>
|
||||||
|
|
||||||
<p>If you want to read more about why I like Ungoogled Chromium, check
|
<p>If you want to read more about why I like Ungoogled Chromium, check
|
||||||
out my article titled
|
out my article titled
|
||||||
<a href="/blog.php/Ungoogled+Chromium+-+The+best+browser+for+most+people">Ungoogled Chromium - The best browser for most people</a>.</p>
|
<a href="https://speedie.site/blog/Ungoogled+Chromium+-+The+best+browser+for+most+people">Ungoogled Chromium - The best browser for most people</a>.</p>
|
||||||
|
|
||||||
<h2>PDFs</h2>
|
<h2>PDFs</h2>
|
||||||
|
|
||||||
|
|
Reference in a new issue