Description: Links containing "~" in Markdown files may cause them to fail to open. Steps to Reproduce: 1. Create a Markdown file (.md) containing the following two URL lines: [Selected range of Release note](https://wiki.documentfoundation.org/ReleaseNotes/26.2#Markdown:~:text=Added%20support%20for%20importing%20from%20Markdown%20format) https://wiki.documentfoundation.org/ReleaseNotes/26.2#Markdown:~:text=Added%20support%20for%20importing%20from%20Markdown%20format 2. Open the file in Writer. Or, the following sample md file. Actual Results: 3. Could not open Markdown file. Expected Results: 3. You can open the file. Reproducible: Always User Profile Reset: No Additional Info: Most Markdown viewers can open this file successfully, and the links will work. Reproducible [2025-12-04] Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 620(Build:0) CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: en-US (ja_JP); UI: en-US Calc: CL threaded Reproducible [2025-12-05] Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 0686b1972806fe8b711de5ba64039fb38cd14889 CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: ja-JP (ja_JP.UTF-8); UI: en-US Calc: threaded
Created attachment 204491 [details] Sample .md file
Reproducible Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 620(Build:0) CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: threaded Latest version that works on the ones I have installed. Version: 25.8.4.1 (X86_64) Build ID: 6ab4ab096601e7cd763971a4dad5a6c7322a1a59 CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: en-GB (es_ES); UI: en-US Calc: threaded
bibisected with win64-26.2 can not open 58cfa7b1a5f44b2dbd945db4fd8261b7227c33b6 can open but document is white 890d2c865215f8a679fbb8e0644e3f73c4c4bb0c *** adding CC: Ujjawal Kumar Please, take a look?
Sure
(In reply to Saburo from comment #3) > bibisected with win64-26.2 > can not open 58cfa7b1a5f44b2dbd945db4fd8261b7227c33b6 > can open but document is white 890d2c865215f8a679fbb8e0644e3f73c4c4bb0c > > *** > adding CC: Ujjawal Kumar > Please, take a look? It is most likely a parsing issue by the md4c library. It is treating the content between the ~ in line 1 and 2 as a separate span somehow and calling only the leave_span_callback twice one with link and another with strike through without calling the corresponding enter_span_callback for the strike through leading to an extra popping for the attributes vector. The same condition triggers with other span elements like */_ or **/__. The simplest solution I can propose is adding a check for the the deletion of elements in the attributes vector. I will additionally report this problem in the git repository of the library.
Removing keywords and will not even add implementationError as this is due to the 3rd party lib.
Ujjawal Kumar committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d38e5bc4102a228d49fdfeddc1e510e9b5bdd7ed tdf#169884 fix crash due to missing empty check before removing element It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Ujjawal Kumar committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/0d81f98c6fac6e11225df4249685539adc4336da tdf#169884 fix crash due to missing empty check before removing element It will be available in 26.2.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9f629738f1fcddc5ef77b0876e8a60330c7a8cd9 tdf#169884: sw_filter_md: Add test It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.