Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aereal/gohn
Hatena Notation (はてな記法) Parser written in Go
https://github.com/aereal/gohn
go parser text-processing
Last synced: 3 months ago
JSON representation
Hatena Notation (はてな記法) Parser written in Go
- Host: GitHub
- URL: https://github.com/aereal/gohn
- Owner: aereal
- License: mit
- Created: 2016-12-27T02:03:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-03T15:12:19.000Z (over 7 years ago)
- Last Synced: 2024-06-20T15:13:01.077Z (7 months ago)
- Topics: go, parser, text-processing
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# gohn
gohn (Hatena Notation parser written in Go) is a parser for Hatena Notation (a.k.a. はてな記法).
**:warning: This software is like a sketch. API or any design may change without notice.**
## AST definition
See [schema.json](schema.json)
## Background
Why do we implement new Hatena Notation parser although there are several implementations?
In short, all of other implementations have a problem about complexity, or (and) lack of formal specification.
### Complexity
The original Hatena Notation spec. and its implementation have some very complex features.
For example, `[URL:title]` notation that tells the parser retrieve `URL` and use retrieved page title for anchor text.Former implementations have failed to separation of concerns.
### Lack of formal specification
As mentioned earlier, we have a specification of Hatena Notation, but it is not formal.
In other words, former implementations are also informal specification.This means we have to know how implementations work if we want to know definition of some notations.
It also causes lost of encapsulation, so changes will be mostly breaking.
## Author
@aereal
## License
The package is available as open source under the terms of the MIT License (see LICENSE).