Skip to content

Commit e90ef30

Browse files
committed
Ensure tags in markdown are backtracked.
Short-term stopgap to ensure they are not rendered in HTML.
1 parent 4897b67 commit e90ef30

4 files changed

Lines changed: 23 additions & 18 deletions

File tree

lib/legacy/legacy-element-mixin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@
430430
* are not automatically handled. For example,
431431
* a user should call `distributeContent` if distribution has been
432432
* invalidated due to an element being added or removed from the shadowRoot
433-
* that contains an insertion point (<slot>) inside its subtree.
433+
* that contains an insertion point (`<slot>`) inside its subtree.
434434
*/
435435
distributeContent() {
436436
if (window.ShadyDOM && this.shadowRoot) {

lib/mixins/property-effects.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@
605605

606606
/**
607607
* Returns true if a binding's metadata meets all the requirements to allow
608-
* 2-way binding, and therefore a <property>-changed event listener should be
608+
* 2-way binding, and therefore a `<property>-changed` event listener should be
609609
* added:
610610
* - used curly braces
611611
* - is a property (not attribute) binding
@@ -1322,7 +1322,7 @@
13221322
*
13231323
* The implementation makes a best-effort at binding interop:
13241324
* Some native element properties have side-effects when
1325-
* re-setting the same value (e.g. setting <input>.value resets the
1325+
* re-setting the same value (e.g. setting `<input>.value` resets the
13261326
* cursor position), so we do a dirty-check before setting the value.
13271327
* However, for better interop with non-Polymer custom elements that
13281328
* accept objects, we explicitly re-set object changes coming from the

lib/mixins/template-stamp.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,43 +136,46 @@
136136
* The template metadata object returned from this method has the following
137137
* structure (many fields optional):
138138
*
139+
* ```js
139140
* {
140141
* // Flattened list of node metadata (for nodes that generated metadata)
141142
* nodeInfoList: [
142143
* {
143144
* // `id` attribute for any nodes with id's for generating `$` map
144-
* id: '<id>',
145+
* id: {string},
145146
* // `on-event="handler"` metadata
146147
* events: [
147148
* {
148-
* name: '<name>'
149-
* value: '<handler name>'
149+
* name: {string}, // event name
150+
* value: {string}, // handler method name
150151
* }, ...
151152
* ],
152153
* // Notes when the template contained a `<slot>` for shady DOM
153154
* // optimization purposes
154-
* hasInsertionPoint: <boolean>,
155-
* // For nested <template> nodes, nested template metadata
156-
* templateInfo: <nested template metadata>,
155+
* hasInsertionPoint: {boolean},
156+
* // For nested `<template>`` nodes, nested template metadata
157+
* templateInfo: {object}, // nested template metadata
157158
* // Metadata to allow efficient retrieval of instanced node
158159
* // corresponding to this metadata
159-
* parentInfo: <reference to parent nodeInfo>,
160-
* parentIndex: <integer index in parent's `childNodes` collection>
161-
* infoIndex: <integer index of this `nodeInfo` in `templateInfo.nodeInfoList`
160+
* parentInfo: {number}, // reference to parent nodeInfo>
161+
* parentIndex: {number}, // index in parent's `childNodes` collection
162+
* infoIndex: {number}, // index of this `nodeInfo` in `templateInfo.nodeInfoList`
162163
* },
163164
* ...
164165
* ],
165166
* // When true, the template had the `strip-whitespace` attribute
166167
* // or was nested in a template with that setting
167-
* stripWhitespace: <boolean>
168+
* stripWhitespace: {boolean},
168169
* // For nested templates, nested template content is moved into
169170
* // a document fragment stored here; this is an optimization to
170171
* // avoid the cost of nested template cloning
171-
* content: <DocumentFragment>
172+
* content: {DocumentFragment}
172173
* }
174+
* ```
173175
*
174176
* This method kicks off a recursive treewalk as follows:
175177
*
178+
* ```
176179
* _parseTemplate <---------------------+
177180
* _parseTemplateContent |
178181
* _parseTemplateNode <------------|--+
@@ -181,6 +184,8 @@
181184
* _parseTemplateNodeAttributes
182185
* _parseTemplateNodeAttribute
183186
*
187+
* ```
188+
*
184189
* These methods may be overridden to add custom metadata about templates
185190
* to either `templateInfo` or `nodeInfo`.
186191
*
@@ -396,7 +401,7 @@
396401
*
397402
* Note that the memoized template parsing process is destructive to the
398403
* template: attributes for bindings and declarative event listeners are
399-
* removed after being noted in notes, and any nested <template>.content
404+
* removed after being noted in notes, and any nested `<template>.content`
400405
* is removed and stored in notes as well.
401406
*
402407
* @param {HTMLTemplateElement} template Template to stamp

lib/utils/flattened-nodes-observer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Class that listens for changes (additions or removals) to
2323
* "flattened nodes" on a given `node`. The list of flattened nodes consists
24-
* of a node's children and, for any children that are <slot> elements,
24+
* of a node's children and, for any children that are `<slot>` elements,
2525
* the expanded flattened list of `assignedNodes`.
2626
* For example, if the observed node has children `<a></a><slot></slot><b></b>`
2727
* and the `<slot>` has one `<div>` assigned to it, then the flattened
@@ -35,7 +35,7 @@
3535
*
3636
* Note: the callback is called asynchronous to any changes
3737
* at a microtask checkpoint. This is because observation is performed using
38-
* `MutationObserver` and the `<slot> element's `slotchange` event which
38+
* `MutationObserver` and the `<slot>` element's `slotchange` event which
3939
* are asynchronous.
4040
*
4141
* @memberof Polymer
@@ -50,7 +50,7 @@
5050
/**
5151
* Returns the list of flattened nodes for the given `node`.
5252
* This list consists of a node's children and, for any children
53-
* that are <slot> elements, the expanded flattened list of `assignedNodes`.
53+
* that are `<slot>` elements, the expanded flattened list of `assignedNodes`.
5454
* For example, if the observed node has children `<a></a><slot></slot><b></b>`
5555
* and the `<slot>` has one `<div>` assigned to it, then the flattened
5656
* nodes list is `<a></a><div></div><b></b>`. If the `<slot>` has other

0 commit comments

Comments
 (0)