Skip to content

Commit

Permalink
Removing target blank from PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Aug 30, 2023
1 parent 4cbc7ef commit 908fa3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _chapters/add-an-api-to-handle-billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Most of this is fairly straightforward but let's go over it quickly:

- We are using a `calculateCost(storage)` function (that we are going to add soon) to figure out how much to charge a user based on the number of notes that are going to be stored.

- We create a new Stripe object using our Stripe Secret key. We are getting this from the environment variable that we configured in the [previous chapter]({% link _chapters/handling-secrets-in-sst.md %}). At the time of this guide's writing, we are using apiVersion `2022-11-15` but you can check the [Stripe documentation](https://stripe.com/docs/api/versioning){:target="_blank"} for the latest version.
- We create a new Stripe object using our Stripe Secret key. We are getting this from the environment variable that we configured in the [previous chapter]({% link _chapters/handling-secrets-in-sst.md %}). At the time of this guide's writing, we are using `apiVersion` `2022-11-15` but you can check the [Stripe documentation](https://stripe.com/docs/api/versioning){:target="_blank"} for the latest version.

- Finally, we use the `stripe.charges.create` method to charge the user and respond to the request if everything went through successfully.

Expand Down
3 changes: 3 additions & 0 deletions etc/ebook/build-epub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def build_chapter chapter_data
# Replace images path
chapter = chapter.gsub(/\/assets\//, '../../assets/')

# Remove target blank
chapter = chapter.gsub('{:target="_blank"}', '')

# Remove class in table
chapter = chapter.gsub('{: .cost-table }', '')

Expand Down
3 changes: 3 additions & 0 deletions etc/ebook/build-pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def build_chapter chapter_data
# Replace images path
chapter = chapter.gsub(/\/assets\//, '../../assets/')

# Remove target blank
chapter = chapter.gsub('{:target="_blank"}', '')

# Remove class in table
chapter = chapter.gsub('{: .cost-table }', '')

Expand Down

0 comments on commit 908fa3a

Please sign in to comment.