Skip to content

Commit

Permalink
More surgery
Browse files Browse the repository at this point in the history
- Remove .eslintignore and .prettierignore files
- Convert from an mdast util to a remark plugin for easier use with
  unified.js processors
- Rename package to remark-astro
- Rename data field from `astromd` to `astro` for consistency and
  easier typing and pronunciation
- Remove documentation of supported syntax from README. We will
  develop better user documentation elsewhere
  • Loading branch information
lpsinger committed Sep 13, 2023
1 parent ff49e5a commit 61edd95
Show file tree
Hide file tree
Showing 14 changed files with 810 additions and 63 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
/coverage
/*.js
/index.js
*.d.ts
.eslintcache
*.tgz
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![codecov](https://codecov.io/gh/nasa-gcn/mdast-astromd/branch/main/graph/badge.svg?token=3ID7X7XNNQ)](https://codecov.io/gh/nasa-gcn/mdast-astromd)
[![codecov](https://codecov.io/gh/nasa-gcn/remark-astro/branch/main/graph/badge.svg?token=3ID7X7XNNQ)](https://codecov.io/gh/nasa-gcn/remark-astro)

# mdast-astromd
# remark-astro

This is a plugin for [mdast](https://github.com/syntax-tree/mdast) for parsing Astro Flavored Markdown, a dialect of [Markdown](https://www.markdownguide.org) for rapid astronomy communications.
This is a plugin for [remark](https://github.com/remarkjs/remark) for parsing Astro Flavored Markdown, a dialect of [Markdown](https://www.markdownguide.org) for rapid astronomy communications.

Astro Flavored Markdown detects dates, times, sky coordinates, and bibliographic references. Astro Flavored Markdown data is tagged in the [mdast](https://github.com/syntax-tree/mdast) syntax tree for later enrichment.

Expand All @@ -11,7 +11,7 @@ An Astro Flavored Markdown node is just an mdast [Text](https://github.com/synta
```ts
export interface AstroText extends Text {
data: {
astromd: {
astro: {
/** Astro Flavored Markdown data type */
type: string
/** Normalized value */
Expand All @@ -21,12 +21,4 @@ export interface AstroText extends Text {
}
```

Astro Flavored Markdown supports the following types.

## datetime

A UTC date with an optional time, normalized to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).

## gcn-circular

A reference to a GCN Circular.
For supported syntax, see the [src/replacements](src/replacements) directory. In each direcetory there is a file called `test.md` illustrating the Markdown syntax and a file called `test.json` containing the resulting syntax tree.
Loading

0 comments on commit 61edd95

Please sign in to comment.