File tree Expand file tree Collapse file tree 3 files changed +36
-20
lines changed
pages/v7/compiletime/no-member-named-reallocate Expand file tree Collapse file tree 3 files changed +36
-20
lines changed Original file line number Diff line number Diff line change 6464}
6565
6666.hljs-addition {
67- background-color : #d4edda ;
68-
69- & ::after {
70- content : " ✅" ;
71- position : absolute ;
72- top : 1px ;
73- left : -6px ;
74- }
67+ background-color : var (--bs-success-bg-subtle )
7568}
7669
7770.hljs-deletion {
78- background-color : #fae3d4 ;
79-
80- & ::after {
81- content : " ⛔" ;
82- position : absolute ;
83- top : 1px ;
84- left : -6px ;
85- }
71+ background-color : var (--bs-danger-bg-subtle );
8672}
8773
88-
8974.hljs-addition , .hljs-deletion {
9075 display : inline-block ;
9176 width : 100% ;
92- position : relative ;
77+ }
78+
79+ .hljs.language-patch {
80+ .hljs-addition {
81+ color : var (--bs-success );
82+ }
83+
84+ .hljs-deletion {
85+ color : var (--bs-danger );
86+ }
87+ }
88+
89+ /* Add a ✅ or ⛔ to the beginning of each line */
90+ /* NOTE: use language "patch" if you don't want this style */
91+ .hljs.language-diff {
92+ .hljs-addition , .hljs-deletion {
93+ position : relative ;
94+
95+ & ::after {
96+ position : absolute ;
97+ top : 1px ;
98+ left : -6px ;
99+ }
100+ }
101+
102+ .hljs-addition ::after {
103+ content : " ✅" ;
104+ }
105+
106+ .hljs-deletion ::after {
107+ content : " ⛔" ;
108+ }
93109}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ options:
1212
1313You must add the ` reallocate() ` method like so:
1414
15- ``` diff
15+ ``` patch
1616 struct SpiRamAllocator {
1717 void* allocate(size_t size) {
1818 return heap_caps_malloc(size, MALLOC_CAP_SPIRAM);
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ options:
1212
1313Here is how to upgrade your code:
1414
15- ``` diff
15+ ``` patch
1616- struct SpiRamAllocator {
1717+ struct SpiRamAllocator : ArduinoJson::Allocator {
1818 void* allocate(size_t size) {
You can’t perform that action at this time.
0 commit comments