Skip to content

Commit

Permalink
FromNand2Tetris: Try another way for custom lexer.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazkovac committed Jan 26, 2025
1 parent b1c4b74 commit d14e044
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,3 @@ jekyll-archives:
permalinks:
tag: /tags/:name/
category: /categories/:name/

plugins:
- rouge
7 changes: 5 additions & 2 deletions _plugins/rouge/hdl.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# _plugins/rouge/hdl.rb
require 'rouge'

module Rouge
module Lexers
class HDLCustom < RegexLexer
tag 'hdlcustom'
class HDL < RegexLexer
tag 'hdl'
filenames '*.hdl'
mimetypes 'text/x-hdl'

Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-08-30-FromNand2Tetris.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ and division of two integers, etc. It is a simple and elegant design.

Here is my implementation in less than twenty lines of HDL code:

```hdlcustom
```hdl
* ALU (Arithmetic Logic Unit):
* Computes out = one of the following functions:
* 0, 1, -1,
Expand Down

0 comments on commit d14e044

Please sign in to comment.