diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2020-08-25 14:23:42 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2020-08-25 17:57:28 +0200 |
commit | be08e5482facaf8f3e773687df3ec5bb1243959c (patch) | |
tree | d4742be01b8872137fc0b7dbf71f87982a19a223 /src | |
parent | 295dd897297722d07ec2ce5fb82e323fe495c775 (diff) | |
download | pesto-be08e5482facaf8f3e773687df3ec5bb1243959c.tar.gz pesto-be08e5482facaf8f3e773687df3ec5bb1243959c.tar.bz2 pesto-be08e5482facaf8f3e773687df3ec5bb1243959c.zip |
Fix links
pandoc does not handle internal links well for some reason, so replace
them with HTML anchors and pray for the best.
Diffstat (limited to 'src')
-rw-r--r-- | src/exe/Doc.lhs | 5 | ||||
-rw-r--r-- | src/lib/Codec/Pesto.lhs | 19 | ||||
-rw-r--r-- | src/lib/Codec/Pesto/Graph.lhs | 8 | ||||
-rw-r--r-- | src/lib/Codec/Pesto/Lint.lhs | 4 | ||||
-rw-r--r-- | src/lib/Codec/Pesto/Parse.lhs | 10 |
5 files changed, 25 insertions, 21 deletions
diff --git a/src/exe/Doc.lhs b/src/exe/Doc.lhs index 63e9847..40508cb 100644 --- a/src/exe/Doc.lhs +++ b/src/exe/Doc.lhs @@ -26,10 +26,9 @@ source code. > ] > , readerStandalone = True } -.. _Pandoc: http://www.pandoc.org/ -Pandoc_ outputs a single HTML5 page with syntax highlighting and MathJax for -formulas. +`Pandoc <http://www.pandoc.org/>`_ outputs a single HTML5 page with syntax +highlighting and MathJax for formulas. > writeDoc tpl = writeHtml5String def { > writerTemplate = tpl diff --git a/src/lib/Codec/Pesto.lhs b/src/lib/Codec/Pesto.lhs index 6940b4c..a1c7c2a 100644 --- a/src/lib/Codec/Pesto.lhs +++ b/src/lib/Codec/Pesto.lhs @@ -19,16 +19,17 @@ About this document This section contains various information about this document. The `second section`__ motivates why inventing another file format is necessary, followed -by the goals_ of Pesto. After a short Pesto primer__ intended for the casual +by the goals__ of Pesto. After a short Pesto primer__ intended for the casual user the language’s syntax__ and semantics__ are presented. The `linting section`__ limits the language to useful cooking recipes. Examples for user presentation of recipes and serialization follow. -__ motivation_ -__ introduction-by-example_ -__ language-syntax_ -__ language-semantics_ -__ linting_ +__ #motivation +__ #goals +__ #introduction-by-example +__ #language-syntax +__ #language-semantics +__ #linting Being a literate program this document is specification and reference implementation at the same time. The code is written in Haskell_ and uses the @@ -190,10 +191,10 @@ microformats.org_ has a similar list of recipe interchange formats. .. _RecipeBook XML: http://web.archive.org/web/20141101132332/http://www.happy-monkey.net/recipebook/ .. _YumML: http://web.archive.org/web/20140703234140/http://vikingco.de/yumml.html .. _Rezkonv: http://www.rezkonv.de/software/rksuite/rkformat.html -.. _RxOL: http://www.dodomagnifico.com/641/Recipes/CompCook.html +.. _RxOL: http://web.archive.org/web/20150814041516/www.dodomagnifico.com/641/Recipes/CompCook.html .. _Gourmet: http://thinkle.github.io/gourmet/ .. _KRecipes: http://krecipes.sourceforge.net/ -.. _Cordon Bleu: http://www.inf.unideb.hu/~bognar/ps_ek/cb_lang.ps +.. _Cordon Bleu: http://web.archive.org/web/20090115210732/http://www.inf.unideb.hu/~bognar/ps_ek/cb_lang.ps .. _microformats.org: http://microformats.org/wiki/recipe-formats .. _Living Cookbook: http://livingcookbook.com/ .. _My CookBook: http://mycookbook-android.com/ @@ -204,6 +205,8 @@ microformats.org_ has a similar list of recipe interchange formats. .. - http://blog.moertel.com/posts/2010-01-08-a-formal-language-for-recipes-brain-dump.html .. - http://www.dangermouse.net/esoteric/chef.html +.. _goals: + Goals ----- diff --git a/src/lib/Codec/Pesto/Graph.lhs b/src/lib/Codec/Pesto/Graph.lhs index 511adca..27dd967 100644 --- a/src/lib/Codec/Pesto/Graph.lhs +++ b/src/lib/Codec/Pesto/Graph.lhs @@ -86,7 +86,7 @@ appear on the shopping list. The same happens for for tools. However they are not part of the final product, but used in the process of making it. For instance they do not appear on the -shopping list. `Time is a tool <time-is-a-tool_>`_. +shopping list. `Time is a tool <#time-is-a-tool>`_. > f ctx (i, Tool _) = addToStack ctx i @@ -112,7 +112,7 @@ adding optional or equivalent ingredients to a recipe (i.e. margarine or butter) References are similar to ingredients. They are used to add items from a workspace labeled with Result or Alternative. More on that `in the next section -<references_>`_. +<#references>`_. > f ctx (i, Reference _) = addToStack ctx i @@ -189,6 +189,8 @@ Unknown directives or instructions are never connected to other nodes. > , cmpGraph "invalid" [] > ] +.. _references: + References ++++++++++ @@ -233,7 +235,7 @@ References can use amounts and units. There are a few cases that do not make sense here (like loops or multiple results with the same name). They are permitted at this stage, but rejected -`later <reject-loops_>`_. +`later <#reject-loops>`_. > , cmpGraphRef "*foobar |foobar >foobar" [(1, 0), (2, 0)] > , cmpGraphRef "|foobar *foobar >foobar *foobar" [(0, 1), (0, 3), (2, 1), (2, 3)] diff --git a/src/lib/Codec/Pesto/Lint.lhs b/src/lib/Codec/Pesto/Lint.lhs index bc99e14..919eeef 100644 --- a/src/lib/Codec/Pesto/Lint.lhs +++ b/src/lib/Codec/Pesto/Lint.lhs @@ -1,3 +1,5 @@ +.. _linting: + Linting ------- @@ -286,7 +288,7 @@ well… References ++++++++++ -All references must be resolved. An `earlier check <resultsused_>`_ makes sure +All references must be resolved. An `earlier check <#resultsused>`_ makes sure all results and alternatives are referenced at some point. > referencesResolved nodes edges = foldl f [] nodes diff --git a/src/lib/Codec/Pesto/Parse.lhs b/src/lib/Codec/Pesto/Parse.lhs index 518b866..ef9a908 100644 --- a/src/lib/Codec/Pesto/Parse.lhs +++ b/src/lib/Codec/Pesto/Parse.lhs @@ -33,11 +33,10 @@ Language syntax > > import Codec.Pesto.Serialize (serialize) -Pesto parses UTF-8_ encoded input data consisting of space-delimited -instructions. Every character within the Unicode whitespace class is -considered a space. +Pesto parses `UTF-8 <https://tools.ietf.org/html/rfc3629>`_ encoded input data +consisting of space-delimited instructions. Every character within the Unicode +whitespace class is considered a space. -.. _UTF-8: https://tools.ietf.org/html/rfc3629 .. _spaces1: > stream = ((,) <$> getPosition <*> instruction) `sepEndBy` spaces1 @@ -251,8 +250,7 @@ Missing units must not be ommited. The version with underscore should be prefere > ] Units and objects are just strings. However units should be limited to -`well-known metric units <well-known-units_>`_ and `some guidelines -<objects-and-annotations_>`_ apply to Objects as well. +`well-known metric units <#well-known-units>`_. > type Unit = String > unit = qstr |