#141 Fandoc syntax

brian Fri 16 Feb 2007

- Code block: anything indented two spaces
- Code inline: 'someMethod'
- Bold: **foo bar**
- Em: *foo bar*
- Heading 1:  underline with ******
- Heading 2:  underline with ====
- Heading 3:  underline with -------
- Leading > for block quotes
- Ordered list: num "." or  letter "."
- Unordered list: "-" space
- Definition lists: "-" space "/" term "/" definition
- Nest list levels if child is at least two spaces indented from parent
- `uri`
- [link text]`uri`
- [#id] appended to any element identifies id to use for fragment URIs
- ![alt text]`uri` for image
- URI rules - auto inline code if no [] link text:
  - `acme::Index` -> index document for "acme" pod
  - `acme::Foo` -> shortcut to type or document called "Foo in "acme" pod
  - `acme::Foo.bar` -> shortcut to bar slot or fragment anchor in "Foo"
  - `Foo` -> shortcut to type of document called "Foo" in my own pod or shortcut to sys type
  - `Foo.bar` -> shortcut bar slot or fragment anchor in my own pod or sys type slot
  - `bar` -> shortcut to my own slot or fragment anchor

brian Mon 19 Feb 2007

I've gotten all the block level elements working.

For list items, you can create multiple paragraphs by leaving a blank line, then continuing a new block at the same indention. You can also insert a code block into a list item by creating a block indented two or more spaces from the list item's indentation.

brian Tue 20 Feb 2007

I added support for admonitions when a paragraph begins with a word in all caps followed by a colon such as "NOTE:". In the HTML the paragraph will output a class attribute with the admonition name.

brian Tue 20 Feb 2007

I've fully implemented the fandoc syntax as specified above.

I changed /xxx/ to be an inline element which maps to the HTML DFN element. That makes things simpler than using true HTML definition lists, which don't work like normal unordered/ordered lists. Mapping /xxx/ to an inline DFN suits my style of technical writing a lot better too.

I haven't done URI remapping - that will be part of the tool chain built on top of the basic fandoc compiler.

brian Sat 5 May 2007

I added support for document level meta data using "**" style comments at the start of the document:

**********************************************************************
** title:      Overview
** author:     Brian Frank
** created:    4 May 07
** copyright:  Copyright (c) 2007, Brian Frank and Andy Frank
** license:    Licensed under the Academic Free License version 3.0
**********************************************************************

brian Wed 9 May 2007

I discovered a couple boundary conditions that I fixed up:

  • I narrowed the range of potential alpha ordered lists to only be a single character to not confuse sentences which wrap to a new line with only one word.
  • The emphasis("*"), strong("**"), and defTerm(/) symbols must be preceded by a space to kick in as special characters so that something like a/b is now ok

Login or Signup to reply.