Skip to content

Commit 01fe8d2

Browse files
committed
Allow explicit section numbering.
1 parent 24e6639 commit 01fe8d2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

clause.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
Polymer('cxx-clause', {
2727
// Convenience function at the clause level, which gets called from <cxx-toc>.
2828
set_clause_num: function(clause_num) {
29+
// If the author explicitly specified the clause number, don't
30+
// use a different number.
31+
if (this.number)
32+
clause_num = this.number
2933
this.update_sec_nums(clause_num);
3034
},
3135

section.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Recognizes attributes 'id' and 'title', but marking these as attributes
1818
cause problems for the ShadowDOM polyfill.
1919
-->
20-
<polymer-element name="cxx-section" constructor="CxxSectionElement">
20+
<polymer-element name="cxx-section" constructor="CxxSectionElement" attributes="number">
2121
<template>
2222
<style>
2323
:host { display: block; }

0 commit comments

Comments
 (0)