Skip to content

Commit

Permalink
Support string interpolation, which closes #23, closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
tani committed Dec 8, 2020
1 parent df69321 commit 9aa9809
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Formula/font-source-code-pro.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class FontSourceCodePro < Formula
version "2.030R-ro-1.050R-it"
sha256 "da2ac159497d31b0c6d9daa8fc390fb8252e75b4a9805ace6a2c9cccaed4932e"
url "https://github.com/adobe-fonts/source-code-pro/archive/#{version.to_s.sub('ro-', 'ro/')}.zip"
version "2.032R-ro-1.052R-it-1.012R-VAR"
sha256 "4d28868a2dc4cd6b767a91cd3d8462983aa8924ae18149f3b1d1a135090a0f8d"
url "https://github.com/adobe-fonts/source-code-pro/archive/#{version.to_s.gsub(/(?<=ro)-|(?<=it)-/, "/")}.zip"
desc "Source Code Pro"
homepage "https://adobe-fonts.github.io/source-code-pro/"
def install
Expand Down
3 changes: 1 addition & 2 deletions Formula/font-source-sans-pro.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
class FontSourceSansPro < Formula
version "3.028R"
sha256 "1186d594ecb1336679a1d102bb6ddbe6041f0fd029482e53f02e46aa3ab011cf"
url "https://github.com/adobe-fonts/source-sans-pro/releases/download/#{version}/source-sans-#{version.to_s.sub(/\./, "
v ")}.zip"
url "https://github.com/adobe-fonts/source-sans-pro/releases/download/#{version}/source-sans-#{version.to_s.sub(/\./, "v")}.zip"
desc "Source Sans Pro"
desc "Fonts designed for user interfaces"
homepage "https://github.com/adobe-fonts/source-sans-pro"
Expand Down
8 changes: 4 additions & 4 deletions cask2formula
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ def replace_cask_version_properties(input_string)
end

class CaskParser < Parslet::Parser
rule(:space) {
rule(:space) {
match("[ \t\n]").repeat
}
rule(:string) {
((str('"') >> (str('"').absent? >> any).repeat >> str('"')) |
rule(:string) {
((str('"') >> ((str('#{') >> (str('}').absent? >> any).repeat >> str('}'))|(str('"').absent? >> any)).repeat >> str('"')) |
(str("'") >> (str("'").absent? >> any).repeat >> str("'"))).as(:string)
}
rule(:word) {
match("[0-9a-zA-Z_]").repeat(1)
}
rule(:keyword) {
rule(:keyword) {
(str(":") >> word).as(:keyword)
}
rule(:pair) {
Expand Down

0 comments on commit 9aa9809

Please sign in to comment.