Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support @ attribute names #249

Merged
merged 4 commits into from
Jul 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add comment for modified
  • Loading branch information
2nthony committed Jul 4, 2019
commit bb6f839c205a2c0d868af529e97bc1b3bf4ad520
4 changes: 4 additions & 0 deletions src/utils/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ inline.autolink = edit(inline.autolink)
.replace('email', inline._email)
.getRegex()

// @modified
// old
// inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/
// new for support `@` attribute names
inline._attribute = /\s+[a-zA-Z@:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/

inline.tag = edit(inline.tag)
Expand Down