Communities

(DEV) Codidact Meta
(DEV) Codidact Meta
(DEV) Writing
(DEV) Writing
Proposals
Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A Testing HTML comment based syntax highlighting

def a(): print("hi") return 1, 2 def a(): print("hi") return 1, 2

1 answer  ·  posted 8mo ago by trichoplax‭  ·  last activity 4mo ago by Mod‭

Question html
#6: Post edited by user avatar trichoplax‭ · 2024-04-22T16:17:18Z (8 months ago)
Try backtick language indication
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • ```python
  • def a():
  • print("hi")
  • return 1, 2
  • ```
#5: Post edited by user avatar trichoplax‭ · 2024-04-22T16:16:17Z (8 months ago)
Try backticks
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • ```
  • def a():
  • print("hi")
  • return 1, 2
  • ```
#4: Post edited by user avatar trichoplax‭ · 2024-04-22T16:15:23Z (8 months ago)
Remove non python code
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
#3: Post edited by user avatar trichoplax‭ · 2024-04-22T16:14:39Z (8 months ago)
Try only one language
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-cpp -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-ruby -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
#2: Post edited by user avatar trichoplax‭ · 2024-04-22T16:13:50Z (8 months ago)
Try language-all
  • <!-- language:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-cpp -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-ruby -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language-all:lang-python -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-cpp -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
  • <!-- language:lang-ruby -->
  • def a():
  • print("hi")
  • return 1, 2
  • int b (int x) {
  • return x
  • }
  • def c(y)
  • puts y
#1: Initial revision by user avatar trichoplax‭ · 2024-04-22T16:13:04Z (8 months ago)
Testing HTML comment based syntax highlighting
<!-- language:lang-python -->

    def a():
        print("hi")
        return 1, 2
    
    int b (int x) {
        return x
    }
    
    def c(y)
        puts y

<!-- language:lang-cpp -->

    def a():
        print("hi")
        return 1, 2
    
    int b (int x) {
        return x
    }
    
    def c(y)
        puts y

<!-- language:lang-ruby -->

    def a():
        print("hi")
        return 1, 2
    
    int b (int x) {
        return x
    }
    
    def c(y)
        puts y