[request] add option for only match when language is set on matter #99

Open
opened 2020-01-04 02:13:27 +00:00 by bluelovers · 0 comments
bluelovers commented 2020-01-04 02:13:27 +00:00 (Migrated from github.com)
let text_not_parse = `---
title: Hello
slug: home
---
<h1>Hello world!</h1>
This is content
<!-- end -->
<h1>Hello world</h1>`;
/*
{
  content: '---\ntitle: Hello\nslug: home\n---<h1>Hello world!</h1>\nThis is content\n<!-- end -->\n<h1>Hello world</h1>',
  data: {},
  isEmpty: false,
  excerpt: ''
}
 */
let text_will_parse = `---yaml
title: Hello
slug: home
---
<h1>Hello world!</h1>
This is content
<!-- end -->
<h1>Hello world</h1>`;
/*
{
  content: '<h1>Hello world!</h1>\nThis is content\n<!-- end -->\n<h1>Hello world</h1>',
  data: { title: 'Hello', slug: 'home' },
  isEmpty: false,
  excerpt: ''
}
 */
```js let text_not_parse = `--- title: Hello slug: home --- <h1>Hello world!</h1> This is content <!-- end --> <h1>Hello world</h1>`; /* { content: '---\ntitle: Hello\nslug: home\n---<h1>Hello world!</h1>\nThis is content\n<!-- end -->\n<h1>Hello world</h1>', data: {}, isEmpty: false, excerpt: '' } */ ``` ```js let text_will_parse = `---yaml title: Hello slug: home --- <h1>Hello world!</h1> This is content <!-- end --> <h1>Hello world</h1>`; /* { content: '<h1>Hello world!</h1>\nThis is content\n<!-- end -->\n<h1>Hello world</h1>', data: { title: 'Hello', slug: 'home' }, isEmpty: false, excerpt: '' } */ ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rtlabs-llm-agents/gms-gray-matter#99
No description provided.