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

Apply v-pre to all anchor elements in pageNav #1732

Merged
merged 4 commits into from
Jan 22, 2022

Conversation

tlylt
Copy link
Contributor

@tlylt tlylt commented Jan 21, 2022

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • Others, please explain:

Overview of changes:
Based on the comment: #1724 (comment)
Previously:

  • v-pre is added to tag on a need basis, i.e. there are {} in the header text of pageNav headers, and therefore keep to escape from Vue rendering.

Now:

  • v-pre is added to all tag for pageNav headers, for simplicity and performance sake.

Functional test files have been updated to deal with the addition of v-pre in HTML and in vue render files:

  • pr1
  • pr2

Anything you'd like to highlight / discuss:
nil

Testing instructions:
nil

Proposed commit message: (wrap lines at 72 characters)
Add v-pre to all anchor elements in pageNav

v-pre is added to anchor elements of pageNav on a need basis
to escape raw {} syntax.

Let's instead add v-pre to all pageNav anchor elements to
keep it simple and performant.


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Copy link
Contributor

@jonahtanjz jonahtanjz left a comment

Choose a reason for hiding this comment

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

Thanks for making the change @tlylt :)

I also noticed now that the page nav title has the same issue.

In the frontmatter, if there are curly braces used in the pageNavTitle similar to the headers,

<frontmatter>
  layout: default.md
  pageNav: 2
  pageNavTitle: {% raw %} "Title interpolation {{ test }}" {% endraw %}
</frontmatter>

it will result in the same issue.

Will have to add v-pre to page nav title anchor as well.

@tlylt
Copy link
Contributor Author

tlylt commented Jan 21, 2022

In the frontmatter, if there are curly braces used in the pageNavTitle similar to the headers,

<frontmatter>
  layout: default.md
  pageNav: 2
  pageNavTitle: {% raw %} "Title interpolation {{ test }}" {% endraw %}
</frontmatter>

it will result in the same issue.

Thanks @jonahtanjz! I have addressed the issue and added a test case for it.

Copy link
Contributor

@jonahtanjz jonahtanjz left a comment

Choose a reason for hiding this comment

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

Thanks @tlylt!

LGTM 👍

@jonahtanjz jonahtanjz modified the milestones: 4.0, 3.1.1 Jan 22, 2022
@jonahtanjz jonahtanjz merged commit 2ea3108 into MarkBind:master Jan 22, 2022
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.

None yet

2 participants