From 252bbfcf4a6de02903d1d045191cd402cc06b4f8 Mon Sep 17 00:00:00 2001 From: szTheory Date: Tue, 3 Mar 2020 15:29:13 +0000 Subject: [PATCH] README fix syntax highlighting --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index ce0970b..4ca5309 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,23 @@ This module provides a easy way to apply cursor-based pagination to your Ecto Qu ## Usage: - 1. Add macro to your repo +1. Add macro to your repo - ```elixir - defmodule MyRepo do - use Ecto.Repo, otp_app: :my_app - use Ecto.Paging.Repo # This string adds `paginate/2` and `page/3` methods. - end - ``` +```elixir +defmodule MyRepo do + use Ecto.Repo, otp_app: :my_app + use Ecto.Paging.Repo # This string adds `paginate/2` and `page/3` methods. +end +``` - 2. Paginate! +2. Paginate! - ```elixir - query = from p in Ecto.Paging.Schema +```elixir +query = from p in Ecto.Paging.Schema - {res, next_paging} = query - |> Ecto.Paging.TestRepo.page(%Ecto.Paging{limit: 150}) - ``` +{res, next_paging} = query +|> Ecto.Paging.TestRepo.page(%Ecto.Paging{limit: 150}) +``` ## Limitations: @@ -33,18 +33,18 @@ This module provides a easy way to apply cursor-based pagination to your Ecto Qu ## Installation - 1. Add `ecto_paging` to your list of dependencies in `mix.exs`: +1. Add `ecto_paging` to your list of dependencies in `mix.exs`: - ```elixir - def deps do - [{:ecto_paging, "~> 0.8.4"}] - end - ``` +```elixir +def deps do + [{:ecto_paging, "~> 0.8.4"}] +end +``` - 2. Ensure `ecto_paging` is started before your application: +2. Ensure `ecto_paging` is started before your application: - ```elixir - def application do - [applications: [:ecto_paging]] - end - ``` +```elixir +def application do + [applications: [:ecto_paging]] +end +```