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

fix: wrong margin inside headers #644

Merged
merged 1 commit into from
Jul 23, 2022

Conversation

NichtsHsu
Copy link
Contributor

@NichtsHsu NichtsHsu commented Jul 19, 2022

Description

If you have an element included inside a header, for an example:

## The `var` keyword

You will find that the element var is set to right margin:

pkQRdJ66BR

JOj87qGcF6

The bug arises from the code here:

{% assign left = left | replace: '">', '"><span class="mr-2">' | append: '</span>' %}

To fix it, we can use replace_first instead of replace:

{% assign left = left | replace_first: '">', '"><span class="mr-2">' | append: '</span>' %}

8yuvFC0Va3

doTqT3NqHF

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How has this been tested

  • I have run bash ./tools/deploy.sh --dry-run (at the root of the project) locally and passed
  • I have tested this feature in the browser

Test Configuration

  • Browser type & version: Google Chrome 103.0.5060.114
  • Operating system: Ubuntu 20.04
  • Ruby version: 2.7.0p0
  • Bundler version: 2.3.13
  • Jekyll version: 4.2.1

Checklist

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@cotes2020 cotes2020 merged commit 3fa1bf3 into cotes2020:master Jul 23, 2022
@NichtsHsu NichtsHsu deleted the fix/wrong-margin branch July 24, 2022 11:46
linkliu pushed a commit to linkliu/game-tech-post-old that referenced this pull request Aug 26, 2022
shihtiy-tw pushed a commit to shihtiy-tw/shihtiy-tw.github.io that referenced this pull request Nov 26, 2022
sanjidnet pushed a commit to sanjidnet/sanjidnet.github.io that referenced this pull request Jan 9, 2023
Ap3x pushed a commit to Ap3x/ap3x.github.com that referenced this pull request Feb 23, 2023
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.

2 participants