fix format err after code block when codegen

udpate msc
This commit is contained in:
pikastech 2023-03-21 13:48:39 +08:00
parent 0d9757024f
commit da27ea4492
3 changed files with 6 additions and 1 deletions

View File

@ -84,6 +84,8 @@ class GPIO(BaseDev):
print("cb1", signal)
io.setCallBack(cb1, io.SIGNAL_RISING)
```
The `signal` parameter is the signal type.
The callback function will be called when the signal is triggered.
"""
def close(self): ...

View File

@ -3219,7 +3219,10 @@ static PIKA_BOOL _strCheckCodeBlockFlag(char* sLine) {
while (pEnd >= pStart && IS_SPACE_OR_TAB(*pEnd)) {
pEnd--;
}
if (pEnd - pStart >= 5 && strncmp(pStart, "```", 3) == 0) {
if (pEnd - pStart < 2) {
return PIKA_FALSE;
}
if (strncmp(pStart, "```", 3) == 0) {
bStart = PIKA_TRUE;
}
if (pEnd - pStart >= 5 && strncmp(pEnd - 2, "```", 3) == 0) {