Skip to content

Commit

Permalink
Merge pull request #1983 from billdawson/timob-7458
Browse files Browse the repository at this point in the history
TIMOB-7458 For JSCA remove angle brackets around Titanium.XX.XX markdown...
  • Loading branch information
joshthecoder committed Apr 12, 2012
2 parents cd6caed + 436737a commit 3fe624e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apidoc/Titanium/Media/Media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ since: "1.8"
properties:
- name: value
summary: The value for the given predicate. See the descriptions
in <MediaQueryType> for information about which properties
in <Titanium.Media.MediaQueryType> for information about which properties
require which values.
type: [Number, String, Boolean]
- name: exact
Expand Down
24 changes: 12 additions & 12 deletions apidoc/Titanium/XML/Node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,62 @@ platforms: [android, iphone, ipad, mobileweb]
properties:
- name: ELEMENT_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Element>
summary: The value of nodeType when this node is a <Titanium.XML.Element>
permission: read-only
value: 1
- name: ATTRIBUTE_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Attr>
summary: The value of nodeType when this node is a <Titanium.XML.Attr>
permission: read-only
value: 2
- name: TEXT_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Text>
summary: The value of nodeType when this node is a <Titanium.XML.Text>
permission: read-only
value: 3
- name: CDATA_SECTION_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.CDATASection> (a type of <Titanium.XML.Text>)
summary: The value of nodeType when this node is a <Titanium.XML.CDATASection> (a type of <Titanium.XML.Text>)
permission: read-only
value: 4
- name: ENTITY_REFERENCE_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.EntityReference> (a type of <Titanium.XML.Node>)
summary: The value of nodeType when this node is a <Titanium.XML.EntityReference> (a type of <Titanium.XML.Node>)
permission: read-only
value: 5
- name: ENTITY_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Entity>
summary: The value of nodeType when this node is a <Titanium.XML.Entity>
permission: read-only
value: 6
- name: PROCESSING_INSTRUCTION_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.ProcessingInstruction>
summary: The value of nodeType when this node is a <Titanium.XML.ProcessingInstruction>
permission: read-only
value: 7
- name: COMMENT_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Comment>
summary: The value of nodeType when this node is a <Titanium.XML.Comment>
permission: read-only
value: 8
- name: DOCUMENT_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Document>
summary: The value of nodeType when this node is a <Titanium.XML.Document>
permission: read-only
value: 9
- name: DOCUMENT_TYPE_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.DocumentType>
summary: The value of nodeType when this node is a <Titanium.XML.DocumentType>
permission: read-only
value: 10
- name: DOCUMENT_FRAGMENT_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.DocumentFragment>
summary: The value of nodeType when this node is a <Titanium.XML.DocumentFragment>
permission: read-only
value: 11
- name: NOTATION_NODE
type: Number
summary: The value of <nodeType> when this node is a <Titanium.XML.Notation>
summary: The value of nodeType when this node is a <Titanium.XML.Notation>
permission: read-only
value: 12
- name: nodeName
Expand Down
11 changes: 10 additions & 1 deletion apidoc/generators/jsca_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ def markdown_to_html(s):
# with this like coming up with ways to link to other types. For now the free-form
# text goes straight is as html generated by markdown. They strip out tags.
# Discussed with Kevin 8/19/2011.
return markdown(s)
html = markdown(s)
# Any <Titanium.XX.XX> type of markdown links need to have their brackets removed so
# the code assist doesn't see them as tags and thus strip them, thereby losing the
# useful text within.
pattern = r"\<Titanium[^\>\s]*\>"
matches = re.findall(pattern, html)
if matches:
for m in matches:
html = html.replace(m, m[1:-1])
return html

# Fixes illegal names like "2DMatrix" (not valid Javascript name)
def clean_namespace(ns_in):
Expand Down

0 comments on commit 3fe624e

Please sign in to comment.