summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatth?us G. Chajdas <dev@anteru.net>2019-05-09 07:28:11 +0200
committerMatth?us G. Chajdas <dev@anteru.net>2019-05-09 07:28:11 +0200
commit41f5b07a3b9e099b3895eb6f239f8007156b2a84 (patch)
treebf06ce9d41df653fa80141de94a08449de309860
parent8f1a1638284cf3e51386c9431aae13452f5e6a90 (diff)
downloadpygments-41f5b07a3b9e099b3895eb6f239f8007156b2a84.tar.gz
Rename the F# parser to F# (same as C#.)
fsharp continues to be a valid alias, so existing code which asks for the FSharp lexer will continue to work.
-rw-r--r--CHANGES1
-rw-r--r--pygments/lexers/_mapping.py2
-rw-r--r--pygments/lexers/dotnet.py9
3 files changed, 5 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index bb6c3cca..3de7f918 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ Version 2.4.1
-------------
- Support CSS variables in stylesheets (PR#814)
+- Fix F# lexer name (PR#709)
Version 2.4.0
-------------
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index aea19b4e..ce1b6dfc 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -153,7 +153,7 @@ LEXERS = {
'EvoqueLexer': ('pygments.lexers.templates', 'Evoque', ('evoque',), ('*.evoque',), ('application/x-evoque',)),
'EvoqueXmlLexer': ('pygments.lexers.templates', 'XML+Evoque', ('xml+evoque',), ('*.xml',), ('application/xml+evoque',)),
'EzhilLexer': ('pygments.lexers.ezhil', 'Ezhil', ('ezhil',), ('*.n',), ('text/x-ezhil',)),
- 'FSharpLexer': ('pygments.lexers.dotnet', 'FSharp', ('fsharp',), ('*.fs', '*.fsi'), ('text/x-fsharp',)),
+ 'FSharpLexer': ('pygments.lexers.dotnet', 'F#', ('fsharp', 'f#'), ('*.fs', '*.fsi'), ('text/x-fsharp',)),
'FactorLexer': ('pygments.lexers.factor', 'Factor', ('factor',), ('*.factor',), ('text/x-factor',)),
'FancyLexer': ('pygments.lexers.ruby', 'Fancy', ('fancy', 'fy'), ('*.fy', '*.fancypack'), ('text/x-fancysrc',)),
'FantomLexer': ('pygments.lexers.fantom', 'Fantom', ('fan',), ('*.fan',), ('application/x-fantom',)),
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index 27ae77c5..1d3b1f38 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -541,16 +541,13 @@ class VbNetAspxLexer(DelegatingLexer):
# Very close to functional.OcamlLexer
class FSharpLexer(RegexLexer):
"""
- For the F# language (version 3.0).
-
- AAAAACK Strings
- http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html#_Toc335818775
+ For the `F# language <https://fsharp.org/>`_ (version 3.0).
.. versionadded:: 1.5
"""
- name = 'FSharp'
- aliases = ['fsharp']
+ name = 'F#'
+ aliases = ['fsharp', 'f#']
filenames = ['*.fs', '*.fsi']
mimetypes = ['text/x-fsharp']