mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-18 09:16:48 +02:00
check for unresolved links in published articles
This commit is contained in:
parent
409a5ed33a
commit
0cb2970d5b
1
Rules
1
Rules
|
@ -83,6 +83,7 @@ compile '*' do
|
|||
when "mkd" # normal pages
|
||||
filter :erb
|
||||
filter :kramdown, :toc_levels => [1,2]
|
||||
filter :markdown_link_check unless @item.draft?
|
||||
filter :colorize_syntax, :default_colorizer => :pygmentize
|
||||
when "org" # org-mode pages
|
||||
filter :org
|
||||
|
|
|
@ -198,7 +198,7 @@ Thus ends the thought experiment. And here is the question: which of these world
|
|||
|
||||
Yet if we believed the asymmetry, then there would be a clear winner - namely *Absencia*! In Absencia, there was a potential for great harm. Had the pie maker not noticed the wrong pot, then the customer's day would've been ruined. But fortunately, this harm was avoided and so, says the asymmetry, an additional good was produced for the customer. Ergo, Absencia is the best.
|
||||
|
||||
If we look at it from the perspective of [Astronomical Waste][#waste], then the absence of benefits, even when there is no existing person being deprived, is still bad. Proponents of this view look at the universe and are disappointed by all the matter that *isn't* used for making people happy (or making happy people). It follows then, if the absence of pleasure causes a harm, then *Lossa* is clearly worse than Defaultia! After all, Lossa almost included a super-pie and super-happy customer, but then didn't after all.
|
||||
If we look at it from the perspective of [Astronomical Waste](#waste), then the absence of benefits, even when there is no existing person being deprived, is still bad. Proponents of this view look at the universe and are disappointed by all the matter that *isn't* used for making people happy (or making happy people). It follows then, if the absence of pleasure causes a harm, then *Lossa* is clearly worse than Defaultia! After all, Lossa almost included a super-pie and super-happy customer, but then didn't after all.
|
||||
|
||||
In a third approach, we could ask Hardcore Consequentialist Robot 9000 what it thinks about these worlds. It would correctly reason that the pie makers initial choice of ingredients was truly random and that the resulting pie was already determined before picking anything. The pie maker will always end up using the intended ingredient and the same pie will be made. Thus, the state of the world is always the same, and as paths to a state don't matter to HCR 9000, all worlds are exactly equal in value. (This scenario is particularly frustrating for HCR 9000's evil archenemy Doctor Deontology. Paths matter, he says, but only random chance was involved this time, so he still has to choose. But how?)
|
||||
|
||||
|
|
14
lib/markdown_link_check.rb
Normal file
14
lib/markdown_link_check.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class MarkdownLinkCheck < Nanoc::Filter
|
||||
identifier :markdown_link_check
|
||||
|
||||
def run(content, params={})
|
||||
content.each_line do |line|
|
||||
if line =~ /\[.+?\]\[.*?\]/
|
||||
puts "#{@item.identifier} -> #{line}"
|
||||
raise "Unresolved link!"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in a new issue