macdown icon indicating copy to clipboard operation
macdown copied to clipboard

Start number of numbered lists

Open simonliu009 opened this issue 6 years ago • 9 comments

When I paste some texts from one of my plain text file and try to put it in markdown format, the numbered list is not displayed correctly. Please find my texts below, it is correct here on issue page but it is not displayed correctly in macDown. macDown version: 0.7.1 (870) os: macOS Mojave 10.14.2 (18C54)

kKFJYt.md.png 第一课 LED 闪烁

  1. user_init()中创建一个任务: xTaskCreate(led_toggle_task, "led_toggle_task", 256, NULL, 1, NULL);

  2. Initialise LED pin: GPIO14 复制examples/driver_lib/driver/gpio.c 复制到项目的driver文件夹,把examples/driver_lib/include/gpio.h复制到项目的include文件夹 设置头文件包含 #include "include/gpio.h"

void led_init( void )    
{
	GPIO_ConfigTypeDef  GPIOConfig;

	GPIOConfig.GPIO_Pin = GPIO_Pin_14;
	GPIOConfig.GPIO_Mode = GPIO_Mode_Output;
	GPIOConfig.GPIO_Pullup = GPIO_PullUp_EN;
	GPIOConfig.GPIO_IntrType = GPIO_PIN_INTR_DISABLE;
	gpio_config( &GPIOConfig );	
}
  1. 进行 GPIO toggle
void led_toggle( void )
{
	uint32_t bit;
	
	bit = GPIO_INPUT_GET( 14 );
	
	GPIO_OUTPUT( GPIO_Pin_14 , bit ^ 0x00000001 );
}
  1. 任务调度

simonliu009 avatar Jan 27 '19 10:01 simonliu009

For easier debugging, please provide source code of minimal working example.

FranklinYu avatar Jan 28 '19 00:01 FranklinYu

Please find the code below.

1)Snapshot.

kQ28pT.png

2) Source code attached as a zip file.

MacDownbug.md.zip

3)Souruce code pasted directly below

  1. list1

111

  1. list2
222
  1. list3
333

simonliu009 avatar Jan 29 '19 10:01 simonliu009

In your example, the preview in MacDown looks the same as in GitHub. What's the issue?

FranklinYu avatar Jan 29 '19 13:01 FranklinYu

Can you see the snapshot? On the left, the list shows 1. list1 2.list2 3.list3 On the right, the list shows 1. list1 1.list2 1.list3, all list items show with number "1". wx20190129-222330 2x

simonliu009 avatar Jan 29 '19 14:01 simonliu009

Ok I got it. I cannot access my Mac now, but I guess the start number feature is not yet supported by the current Markdown engine in MacDown. I'll mark this as "upstream" unless I find otherwise afterwards.

MWE (unverified)

Source:

2.  item

Expected:

<ol start="2">
  <li>item</li>
</ol>

Actual:

<ol>
  <li>item</li>
</ol>

FranklinYu avatar Jan 30 '19 13:01 FranklinYu

I hope this bug will be fixed because this is the only issue I have with MacDown, so far. I tested with GitHub and some other Markdown apps. It respect the source.

iFredOS avatar Apr 18 '19 08:04 iFredOS

@iFredOS It’s not a bug, but lack of a feature. It’s called “start number” instead of “to respect the source”.

FranklinYu avatar Apr 29 '19 13:04 FranklinYu

Hi! When you can add this feature? I really need this.

zodinyac avatar Oct 12 '19 13:10 zodinyac

This also often bugs me. Would love to see that fixed.

porg avatar Nov 24 '21 22:11 porg