Skip to content

Commit

Permalink
doc for id attribute improved
Browse files Browse the repository at this point in the history
  • Loading branch information
ppl-lang committed Sep 8, 2021
1 parent 509c036 commit 592dc29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ service PML_chapter_formal_node
HTML_writer = fa_PML_chapter_node_HTML_writer.create
documentation = simple_documentation.create (
title = "Chapter"
description = "A chapter or sub-chapter of the document. A chapter can have any number of sub-chapters. Chapters can be nested to any level."
description = '''A chapter or sub-chapter of the document. A chapter can have any number of sub-chapters. Chapters can be nested to any level.'''
examples = '''[ch (id=intro) [title Introduction]
[ch [title What is This About?]
blah blah blah
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ service formal_node_attributes
value_parser = se_string_parser.instance
documentation = simple_documentation.create (
title = "Node Identifier"
description = '''A unique identifier for the node. The id can be used for cross-referencing, or for local links in the resulting HTML code.
description = '''A unique identifier for the node.

An id can be used to:
- identify a node so that an internal link can be done with an 'xref' (cross reference) node.
- identify a node so that it can be styled individually with CSS
- create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

An identifier must start with a letter and can be followed by any number of letters, digits, and underscores. Note for programmers: The regex of an identifier is: [a-zA-Z][a-zA-Z0-9_]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.'''

examples = "id = basic_concept" ) )

att caption formal_parameter<string or null> = formal_parameter<string or null>.create (
Expand Down

0 comments on commit 592dc29

Please sign in to comment.