# Web clipper - markdown filter shouldn’t remove linebreak

**URL:** <https://forum.obsidian.md/t/web-clipper-markdown-filter-shouldn-t-remove-linebreak/95050>\
**Category:** Help\
**Created:** [January 18, 2025, 3:09pm UTC](https://forum.obsidian.md/t/web-clipper-markdown-filter-shouldn-t-remove-linebreak/95050 "2025-01-18T15:09:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_V](https://forum.obsidian.md/user_avatar/forum.obsidian.md/fred_v/32/65051_2.png) [@Fred\_V](https://forum.obsidian.md/u/Fred_V)\
**Post date:** [January 18, 2025, 3:09pm UTC](https://forum.obsidian.md/t/web-clipper-markdown-filter-shouldn-t-remove-linebreak/95050/1 "2025-01-18T15:09:08Z")

</div>

### Steps to reproduce

Install this test template:

```json
{
  "schemaVersion": "0.1.0",
  "name": "Tweet test",
  "behavior": "create",
  "noteContentFormat": "<!-- tweet content only -->\n{{selectorHtml:article[tabindex=\"-1\"][data-testid=\"tweet\"] .css-175oi2r.r-1s2bzr4 > [data-testid=\"tweetText\"]:first-of-type|markdown}}",
  "properties": [
    {
      "name": "title",
      "value": "{{title}}",
      "type": "text"
    },
    {
      "name": "url",
      "value": "{{url}}",
      "type": "text"
    },
    {
      "name": "author",
      "value": "{{selector:article[tabindex=\\\"-1\\\"][data-testid=\\\"tweet\\\"] [data-testid=\\\"User-Name\\\"] span.css-1jxf684.r-bcqeeo.r-1ttztb7.r-qvutc0.r-poiln3|first|safe_name}}",
      "type": "text"
    },
    {
      "name": "userID",
      "value": "{{url|split:\\\"/\\\"|slice:3,4}}",
      "type": "text"
    },
    {
      "name": "profile",
      "value": "https://x.com/{{url|split:\\\"/\\\"|slice:3,4}}",
      "type": "text"
    },
    {
      "name": "image",
      "value": "{{selector:img[alt=\\\"Image\\\"]?src|first}}",
      "type": "text"
    },
    {
      "name": "published",
      "value": "{{selector:article[tabindex=\\\"-1\\\"][data-testid=\\\"tweet\\\"] a[role=\\\"link\\\"] > time?datetime}}",
      "type": "date"
    },
    {
      "name": "created",
      "value": "{{date}}",
      "type": "date"
    }
  ],
  "triggers": [
    "/^https:\\/\\/x\\.com\\/.+?\\/status\\/\\d+$/"
  ],
  "noteNameFormat": "Tweet - {{selector:article[tabindex=\"-1\"][data-testid=\"tweet\"] [data-testid=\"User-Name\"] span.css-1jxf684.r-bcqeeo.r-1ttztb7.r-qvutc0.r-poiln3|first|safe_name}} ({{selector:article[tabindex=\"-1\"][data-testid=\"tweet\"] a[role=\"link\"] > time?datetime|date:\"YYYY-MM-DD HH[h]mm\"}})",
  "path": "References/Tweets"
}

```

- Test this template on [MarioNawfal/1880468639519826348](https://x.com/MarioNawfal/status/1880468639519826348)

### Expected result

Should return the content as displayed on the web keeping line break like this:

```auto
IF THERE AREN'T ENOUGH BABIES. THAT CHANGES EVERYTHING

The global estimate of births has been steadily declining since the 1950s, according to data from various sources like the united nations and u.s. centers for disease control.

By 2023, the global rate is projected to be 2.15, with the u.s. at 1.62 and south korea at an alarmingly low 0.72.

The trend could have profound impacts on economies, social structures, and future generations, and potentially collapsing countries.

Source: Wsj. World Economic Forum

```

### Actual result

Returns

```auto
<!-- tweet content only -->
IF THERE AREN'T ENOUGH BABIES. THAT CHANGES EVERYTHING The global estimate of births has been steadily declining since the 1950s, according to data from various sources like the united nations and u.s. centers for disease control. By 2023, the global rate is projected to be 2.15, with the u.s. at 1.62 and south korea at an alarmingly low 0.72. The trend could have profound impacts on economies, social structures, and future generations, and potentially collapsing countries. Source: Wsj. World Economic Forum

```

### Environment

Web Clipper 0.10.5  
Firefox 134.0.1

* * *

### Additional information

This issue is also mention [here](https://forum.obsidian.md/t/linebreak-issue-with-the-new-webclipper/92005) with sort of workaround but not as good as is the markdown filter would work as expected. We could use `selector` instead of `selectorHtml:…|markdown` but we loose url and alt img text.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [January 18, 2025, 4:37pm UTC](https://forum.obsidian.md/t/web-clipper-markdown-filter-shouldn-t-remove-linebreak/95050/2 "2025-01-18T16:37:48Z")

</div>

Moved to help section.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [April 18, 2025, 4:38pm UTC](https://forum.obsidian.md/t/web-clipper-markdown-filter-shouldn-t-remove-linebreak/95050/3 "2025-04-18T16:38:46Z")

</div>

Closed on April 18, 2025, 4:38pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
