Added file and inline link anchors.

* Auto-link for documents. If there is an `org` directive in the first doc
  block of the file then it is used as the file link definition. If there is no
  such `org` directive then on is created automatically. This resolves issue
  #0008. There is a new LinkAnchor type for these links: `LinkType.FileLink`
* Multiple `org` directives per DocBlock are now allowed. There is a new
  LinkAnchor link type for these link: `LinkType.InlineLink`.
* Refactored `LinkType.OrgLink` to be `LinkType.BlockLink`.
* Tweaked CSS
* Refactored `LiterateMarkdownGenerator.emit(DocBlock)` for simplicity.
This commit is contained in:
Jonathan Bernard
2012-01-06 14:41:01 -06:00
parent 051cd54dcd
commit a86b55726f
10 changed files with 122 additions and 77 deletions

View File

@ -1,16 +0,0 @@
Fix delimited doc block behavior.
=================================
Delimited doc blocks require that the start token be the first non-space token
on the line it is on and that the end token be on it's own line. This is not in
line with the general nature of delimited comment blocks, which do not place
any restrictions on what comes before the start delimiter or after the end
delimiter.
----
========= ===================
Created : 2011-09-07
Resolved: 2011-12-25T23:26:07
========= ===================

View File

@ -7,9 +7,10 @@ line with the general nature of delimited comment blocks, which do not place
any restrictions on what comes before the start delimiter or after the end
delimiter.
----
========= ==========
Created: 2011-09-07
Resolved: YYYY-MM-DD
========= ==========
========= ===================
Created : 2011-09-07
Resolved: 2011-12-25T23:26:07
========= ===================

18
doc/issues/0010fs5.rst Normal file
View File

@ -0,0 +1,18 @@
Modify `org` behavior to include simple anchors.
================================================
Currently JLP supports at most one `org` directive per block which identifies the block.
It would be useful to support multiple `org` directives within a block, particularly
when there is a large block that may have many interesting internal targets. Maybe the
`org` directive should be handled differently when it is used multiple times within a
block. This would be discovered in the generator parse phase and we could change the
LinkAnchor type at that time. During the parse phase we emit the new type of anchors
as `<a id="link-name"/>` into the document. We would also change our search for block
ids to inly look for the single-occurance type of `orgs`.
----
========= ===================
Created : 2012-01-05T11:40:35
Resolved: 2012-01-06T14:32:46
========= ===================