Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jul 2, 2019
1 parent 53f099d commit aff70eb
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ class BlockList extends Component {
return;
}

// This is much faster than having to search all attributes for text
// and parse the HTML. Perhaps this should also be debounced.
const noteAnchors = document.querySelectorAll( '.note-anchor' );
const notes = Array.from( noteAnchors ).map( ( element ) => {
return {
Expand Down Expand Up @@ -256,21 +258,21 @@ class BlockList extends Component {
<style
dangerouslySetInnerHTML={ {
__html: `
body {
counter-reset: footnotes;
}
body {
counter-reset: footnotes;
}
.editor-styles-wrapper a.note-anchor {
counter-increment: footnotes;
}
.editor-styles-wrapper a.note-anchor {
counter-increment: footnotes;
}
.note-anchor:after {
margin-left: 2px;
content: '[' counter( footnotes ) ']';
vertical-align: super;
font-size: smaller;
}
`,
.note-anchor:after {
margin-left: 2px;
content: '[' counter( footnotes ) ']';
vertical-align: super;
font-size: smaller;
}
`,
} }
/>
<ol>
Expand Down

0 comments on commit aff70eb

Please sign in to comment.