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

Support markdown for header attr in dropdown #1029

Merged
merged 8 commits into from
Feb 22, 2020

Conversation

le0tan
Copy link
Contributor

@le0tan le0tan commented Feb 6, 2020

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [X] New feature

What is the rationale for this request?

In response to #1013 (review)

What changes did you make? (Give an overview)

Support markdown syntax for header attribute of a dropdown component. Let text attribute take priority over header (i.e. if text attribute is present, its value would be rendered as raw HTML in dropdown while header attribute, if present, would be ignored completely.)

Testing instructions:

Replace vue-strap from this PR
Here are some test examples:
<dropdown header="**strong**"></dropdown>
<dropdown header="![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png)"></dropdown>
<dropdown text="<i>italic</i>" header="**s**"></dropdown> - to test that text takes priority over header

Proposed commit message: (wrap lines at 72 characters)

Support markdown for header attribute in dropdown.

  • header attr now supports inline markdown syntax
  • text attr is reserved, and still supports raw HTML
  • text attr now takes priority over header

Add support for header slot
@yamgent
Copy link
Member

yamgent commented Feb 16, 2020

I think you forgot to update the test files.

* testing edge cases on parsing header/text attr of Dropdown component
Copy link
Contributor

@ang-zeyu ang-zeyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍
just a few minor things:

test/unit/utils/componentParserData.js Outdated Show resolved Hide resolved
@le0tan le0tan requested a review from ang-zeyu February 21, 2020 07:47
@yamgent
Copy link
Member

yamgent commented Feb 22, 2020

@le0tan Resolve the merge conflict

# Conflicts:
#	test/unit/utils/componentParserData.js
@le0tan
Copy link
Contributor Author

le0tan commented Feb 22, 2020

@yamgent I resolved the conflicts.

@yamgent yamgent added this to the v2.10.1 milestone Feb 22, 2020
@yamgent yamgent merged commit b90f9aa into MarkBind:master Feb 22, 2020
@damithc
Copy link
Contributor

damithc commented Feb 23, 2020

Works in production. Good work @le0tan and reviewers.

Tejas2805 added a commit to Tejas2805/markbind that referenced this pull request Feb 27, 2020
* 'master' of https://github.com/MarkBind/markbind:
  Update tests
  Allow using 'none' footer attribute in frontmatter (MarkBind#1002)
  Support line numbers for code blocks (MarkBind#991)
  2.11.0
  Update test files due to changes in PR MarkBind#982
  Update vue-strap version to v2.0.1-markbind.36
  Make highlighting bold (MarkBind#1045)
  Support markdown for header attr in dropdown (MarkBind#1029)
  Add '_site' to the ignored folders in site.json (MarkBind#1046)
  Use path.join instead of string interpolation (MarkBind#1052)
  Implement box markdown header attributes parsing (MarkBind#1025)
  Make the position of top navbar fixed (MarkBind#982)
  Exclude *.md files from being copied over on build (MarkBind#1010)

# Conflicts:
#	docs/css/main.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants